CertIsRDNAttrsInCertificateName (Windows CE 5.0)

Send Feedback

This function compares the attributes in the certificate name with the specified CERT_RDN structure to determine whether all attributes are included there. The comparison iterates through the CERT_RDN structure and looks for an attribute match in any of the certificate name's CERT_RDN structures.

BOOL WINAPI CertIsRDNAttrsInCertificateName(DWORDdwCertEncodingType,DWORDdwFlags,PCERT_NAME_BLOBpCertName,PCERT_RDNpRDN);

Parameters

  • dwCertEncodingType
    [in] Specifies the encoding type used. Currently, only X509_ASN_ENCODING is used; however, additional encoding types may be added in the future.

  • dwFlags
    [in] Bitmask of flags. A value of CERT_UNICODE_IS_RDN_ATTRS_FLAG must be set if the pRDN parameter was initialized with UNICODE strings as in the CryptEncodeObject function with the lpszStructType parameter set to X509_UNICODE_NAME.

    CERT_CASE_INSENSITIVE_IS_RDN_ATTRS_FLAG is set to do a case-insensitive match. Otherwise, an exact, case-sensitive match is done.

  • pCertName
    [in] Pointer to a BLOB containing the encoded subject or issuer name.

  • pRDN
    [in] Array of CERT_RDN structures containing the attributes to be found in the name. The CERT_RDN_ATTR member of the CERT_RDN structure adheres to the following rules:

    • If pszObjId is NULL, the attribute object identifier (OID) is ignored.
    • If dwValueType is CERT_RDN_ANY_TYPE, the value type is ignored.
    • If the pbData member of Value is NULL, any value can be a match.

Return Values

If the function succeeds, the return value is nonzero, or TRUE.

If the function fails, the return value is zero, or FALSE.

For extended error information, call the GetLastError function.

The following table shows the error codes for this function.

Error code Description
CRYPT_E_NO_MATCH Not all the attributes were found and matched.
ERROR_FILE_NOT_FOUND Invalid certificate encoding type. Currently only X509_ASN_ENCODING is supported.

Remarks

Currently, only an exact, case-sensitive match is supported.

The desktop operating system supports the flag PKCS_7_ASN_ENCODING, but Windows CE does not and ignores the flag when it is specified.

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Wincrypt.h.
Link Library: Crypt32.lib.

See Also

CertFindCertificateInStore | BLOB | CERT_RDN | CERT_RDN_ATTR

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.