CryptSIPCreateIndirectData function

The CryptSIPCreateIndirectData function returns a SIP_INDIRECT_DATA structure that contains a hash of the supplied SIP_SUBJECTINFO structure, the digest algorithm, and an encoding attribute. The hash can be used as an indirect reference to the data.

Syntax

BOOL CryptSIPCreateIndirectData(
  IN SIP_SUBJECTINFO    *pSubjectInfo,
  IN OUT DWORD          *pcbIndirectData,
  OUT SIP_INDIRECT_DATA *pIndirectData
);

Parameters

pSubjectInfo

A pointer to a SIP_SUBJECTINFO structure that contains the subject to which the indirect data reference will point.

pcbIndirectData

A pointer to a DWORD value to receive the size of the returned SIP_INDIRECT_DATA structure.

pIndirectData

A pointer to a SIP_INDIRECT_DATA structure to receive the catalog item.

Return Value

The return value is TRUE if the function succeeds; otherwise, FALSE.

If this function returns FALSE, additional error information can be obtained by calling the GetLastError function. GetLastError will return one of the following error codes.

Return code Description
ERROR_BAD_FORMAT
The file or data format is not correct for the specified subject interface package (SIP) type.
ERROR_INVALID_PARAMETER
One or more of the parameters are not valid.
ERROR_NOT_ENOUGH_MEMORY
There was an error allocating memory.
NTE_BAD_ALGID
The specified algorithm is not supported by the SIP.
TRUST_E_SUBJECT_FORM_UNKNOWN
The subject type is not recognized.

Remarks

If pcbIndirectData points to a DWORD and pIndirectData points to NULL, the size of the data will be returned in pcbIndirectData.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header mssip.h
Library Crypt32.lib
DLL Crypt32.dll