MSDN Library

CertIsRDNAttrsInCertificateName

Windows CE 3.0

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(
DWORD dwCertEncodingType,
DWORD dwFlags,
PCERT_NAME_BLOB pCertName,
PCERT_RDN pRDN
);

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] 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 follows the these 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 (TRUE).

If the function fails, the return value is zero (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 platform supports the PKCS_7_ASN_ENCODING flag, but Windows CE does not. Windows CE ignores the flag when it is specified.

Requirements

Runs On Versions Defined in Include Link to
Windows CE OS 3.0 or later Wincrypt.h   Crypt32.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

CertFindCertificateInStore, BLOB, CERT_RDN, CERT_RDN_ATTR


 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.

Show:
© 2016 Microsoft