Expand Minimize

PFN_IMPORT_PUBLIC_KEY_INFO_EX2_FUNC function pointer

The PFN_IMPORT_PUBLIC_KEY_INFO_EX2_FUNC callback function is called by CryptImportPublicKeyInfoEx2 to decode the public key algorithm identifier, load the algorithm provider, and import the key pair.

Syntax


typedef BOOL ( WINAPI *PFN_IMPORT_PUBLIC_KEY_INFO_EX2_FUNC)(
  _In_   DWORD dwCertEncodingType,
  _In_   PCERT_PUBLIC_KEY_INFO pInfo,
  _In_   DWORD dwFlags,
  _In_   void *pvAuxInfo,
  _Out_  BCRYPT_KEY_HANDLE *phKey
);

Parameters

dwCertEncodingType [in]

The certificate encoding type that was used to encrypt the subject. The message encoding type identifier, contained in the high WORD of this value, is ignored by this function.

This parameter can be the following currently defined certificate encoding type.

ValueMeaning
X509_ASN_ENCODING
1 (0x1)

Specifies X.509 certificate encoding.

 

pInfo [in]

A pointer to a CERT_PUBLIC_KEY_INFO structure that contains the public key information to import into the provider.

dwFlags [in]

A set of flags that modify the behavior of this function. This can be zero.

pvAuxInfo [in]

This parameter is reserved for future use and must be set to NULL.

phKey [out]

A pointer to a BCRYPT_KEY_HANDLE variable that receives the handle of the imported key.

Return value

If the function succeeds, the function returns nonzero (TRUE).

If the function fails, it returns zero (FALSE). For extended error information, call GetLastError.

Remarks

You can use OID Support Functions to deploy this callback function. Wincrypt.h defines the following constant for this purpose.

ConstantDefinition
CRYPT_OID_IMPORT_PUBLIC_KEY_INFO_EX2_FUNC"CryptDllImportPublicKeyInfoEx2"

 

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Wincrypt.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.