CertComparePublicKeyInfo function
The CertComparePublicKeyInfo function compares two encoded public keys to determine whether they are identical.
Syntax
BOOL WINAPI CertComparePublicKeyInfo( _In_ DWORD dwCertEncodingType, _In_ PCERT_PUBLIC_KEY_INFO pPublicKey1, _In_ PCERT_PUBLIC_KEY_INFO pPublicKey2 );
Parameters
- dwCertEncodingType [in]
-
Specifies the encoding type used. It is always acceptable to specify both the certificate and message encoding types by combining them with a bitwise-OR operation as shown in the following example:
X509_ASN_ENCODING | PKCS_7_ASN_ENCODING
Currently defined encoding types are:
- X509_ASN_ENCODING
- PKCS_7_ASN_ENCODING
- pPublicKey1 [in]
-
A pointer to the CERT_PUBLIC_KEY_INFO for the first public key in the comparison.
- pPublicKey2 [in]
-
A pointer to the CERT_PUBLIC_KEY_INFO for the second public key in the comparison.
Return value
If the public keys are identical and the function succeeds, the function returns nonzero (TRUE).
If the function fails, it returns zero (FALSE).
Examples
For an example that uses this function, see Example C Program: Deleting Certificates from a Certificate Store.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also