SIP_SUBJECTINFO structure

The SIP_SUBJECTINFO structure specifies subject information data to the subject interface package (SIP) APIs.

Syntax

typedef struct SIP_SUBJECTINFO_ {
  DWORD                      cbSize;
  GUID                       *pgSubjectType;
  HANDLE                     hFile;
  LPCWSTR                    pwsFileName;
  LPCWSTR                    pwsDisplayName;
  DWORD                      dwReserved1;
  DWORD                      dwIntVersion;
  HCRYPTPROV                 hProv;
  CRYPT_ALGORITHM_IDENTIFIER DigestAlgorithm;
  DWORD                      dwFlags;
  DWORD                      dwEncodingType;
  DWORD                      dwReserved2;
  DWORD                      fdwCAPISettings;
  DWORD                      fdwSecuritySettings;
  DWORD                      dwIndex;
  DWORD                      dwUnionChoice;
  union {
#if ...
    MS_ADDINFO_FLAT_                 *psFlat;
#else
    struct MS_ADDINFO_FLAT_          *psFlat;
#endif
#if ...
    MS_ADDINFO_CATALOGMEMBER_        *psCatMember;
#else
    struct MS_ADDINFO_CATALOGMEMBER_ *psCatMember;
#endif
#if ...
    MS_ADDINFO_BLOB_                 *psBlob;
#else
    struct MS_ADDINFO_BLOB_          *psBlob;
#endif
  };
  LPVOID                     pClientData;
} SIP_SUBJECTINFO, *LPSIP_SUBJECTINFO;

Members

cbSize

The size, in bytes, of this structure.

pgSubjectType

A pointer to a GUID structure that identifies the subject type.

hFile

A file handle that represents the subject. If the storage type of the subject is a file, set hFile to INVALID_HANDLE_VALUE and set the pwsFileName parameter to the name of the file.

pwsFileName

A pointer to a null-terminated Unicode string that contains the file name of the subject.

pwsDisplayName

A pointer to a null-terminated Unicode string that contains the display name of the subject.

dwReserved1

This member is reserved for future use.

dwIntVersion

This member is reserved. Do not modify this member. It is used by the SIP to pass the internal version number between get and verify functions.

hProv

An HCRYPTPROV handle to the cryptography provider.

DigestAlgorithm

A CRYPT_ALGORITHM_IDENTIFIER structure that contains the identifier for the hash algorithm used to hash the file.

dwFlags

A value that modifies the behavior of the functions that use this structure. For more information about possible values for this member, see the dwFlags parameter of SignerSignEx.

dwEncodingType

A value that specifies the encoding type used for the file. Currently, only X509_ASN_ENCODING and PKCS_7_ASN_ENCODING are being used; however, additional encoding types may be added in the future. For either current encoding type, use: X509_ASN_ENCODING | PKCS_7_ASN_ENCODING.

dwReserved2

This member is reserved for future use.

fdwCAPISettings

This member is not used.

fdwSecuritySettings

This member is not used.

dwIndex

The message index of the last call to CryptSIPGetSignedDataMsg. operation.

dwUnionChoice

Specifies the type of additional information provided.

Defined constant/value Meaning
MSSIP_ADDINFO_NONE
0
There is no additional information about the subject.
MSSIP_ADDINFO_FLAT
1
The additional information is a flat file.
MSSIP_ADDINFO_CATMEMBER
2
The additional information is a catalog member.
MSSIP_ADDINFO_BLOB
3
The additional information is a BLOB.
MSSIP_ADDINFO_NONMSSIP
500
The additional information is in a user defined format.

__unnamed_union_0387_1

__unnamed_union_0387_1.psFlat.#1011434503

__unnamed_union_0387_1.psFlat.#3641760981

__unnamed_union_0387_1.psCatMember.#2094949513

__unnamed_union_0387_1.psCatMember.#224581209

__unnamed_union_0387_1.psBlob.#305780496

__unnamed_union_0387_1.psBlob.#4080570564

pClientData

A pointer to SIP-specific data.

Remarks

Upon first use of the SIP_SUBJECTINFO structure, initialize the entire structure to binary zero. Do not initialize the structure between SIP function calls.

Subjects include, but are not limited to, portable executable images (.exe), cabinet (.cab) images, flat files, and catalog files. Each subject type uses a different subset of its data for hash calculation and requires a different procedure for storage and retrieval. Therefore each subject type has a unique subject interface package specification.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header mssip.h