Expand Minimize

CertSelectionGetSerializedBlob function

The CertSelectionGetSerializedBlob function is a helper function used to retrieve a serialized certificate BLOB from a CERT_SELECTUI_INPUT structure.

Syntax


HRESULT WINAPI CertSelectionGetSerializedBlob(
  _In_   PCERT_SELECTUI_INPUT pcsi,
  _Out_  void **ppOutBuffer,
  _Out_  ULONG *pulOutBufferSize
);

Parameters

pcsi [in]

A pointer to a CERT_SELECTUI_INPUT structure that contains the certificate store and certificate context chain information.

ppOutBuffer [out]

The address of a pointer to a buffer that receives the serialized certificates BLOB.

pulOutBufferSize [out]

A pointer to a ULONG to receive the size, in bytes, of the BLOB received in the buffer pointed to by the ppOutBuffer parameter.

Return value

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. If both hStore and prgpChain parameters are not NULL, return E_INVALIDARG. For a list of common error codes, see Common HRESULT Values.

Remarks

The returned serialized BLOB is passed to the CredUIPromptForWindowsCredentials function in the pvInAuthBuffer parameter to allow a user to select a certificate by using the credential selection UI.

The certificates that are serialized in the BLOB returned in the buffer pointed to by the ppOutBuffer parameter of this function are dependent on the values of the hStore and prgpChain members of the CERT_SELECTUI_INPUT structure.

hStoreprgpChainCertificates serialized

NULL

not NULL

The certificates pointed to by the prgpChain member are serialized.

not NULL

NULL

The certificates specified by the hStore member are serialized.

NULL

NULL

An empty BLOB is returned.

not NULL

not NULL

The call fails and the function returns E_INVALIDARG.

 

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Cryptuiapi.h

DLL

Cryptui.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.