CertCompareCertificateName function

The CertCompareCertificateName function compares two certificate CERT_NAME_BLOB structures to determine whether they are identical. The CERT_NAME_BLOB structures are used for the subject and the issuer of certificates.

Syntax

BOOL CertCompareCertificateName(
  DWORD           dwCertEncodingType,
  PCERT_NAME_BLOB pCertName1,
  PCERT_NAME_BLOB pCertName2
);

Parameters

dwCertEncodingType

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

pCertName1

A pointer to a CERT_NAME_BLOB for the first name in the comparison. For more information, see CRYPT_INTEGER_BLOB.

pCertName2

A pointer to a CERT_NAME_BLOB for the second name in the comparison.

Return Value

If the names are identical and the function succeeds, the function returns nonzero (TRUE).

If the function fails, it returns zero (FALSE).

Requirements

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

See Also

CERT_NAME_BLOB

CertCompareCertificate

Data Management Functions