[This is preliminary documentation and subject to change.]
The CertFindSubjectInSortedCTL function attempts to find the specified subject in a sorted CTL.
#include <wincrypt.h>
BOOL WINAPI CertFindSubjectInSortedCTL(
PCRYPT_DATA_BLOB pSubjectIdentifier, // in
PCCTL_CONTEXT pCtlContext, // in
DWORD dwFlags, // in
void *pvReserved, // in
PCRYPT_DER_BLOB pEncodedAttributes // out, optional
);
This parameter is reserved for future use and should always be zero.
TRUE if the SubjectIdentifier exists in the CTL, FALSE if the function does not locate a matching SubjectIdentifier.
// EXAMPLE CODE FOR USING CertFindSubjectInSortedCTL().
// Assume pointers to the Subject Blob (pSubjectIdentifier) and
// the PCCTL_CONTEXT (pCtlContext) are initialized elsewhere.
// Declare and initialize.
PCRYPT_DER_BLOB pSubjectIdentifier;
// Pointer to a BLOB structure
// identifiable to the subject.
// Initialized elsewhere
PCCTL_CONTEXT pCtlContext; // Pointer to a CTL context.
// Initialized elsewhere
CRYPT_DER_BLOB EncodedAttributes;
// Pointer to a BLOB struture
// containing the found Subject's
// encoded attributes.
BOOL fResult; // Returns TRUE if function finds a
// SubjectIdentifier in the CTL.
// FALSE if the SubjectIdentifier is
// not found.
// Function call to CertFindSubjectInSortedCTL().
fResult= CertFindSubjectInSortedCTL(
pSubjectIdentifier, // in- Pointer to a BLOB struture,
// identifying the subject.
pCtlContext, // in- Pointer to the CTL_CONTEXT
// to be searched.
0, // in- dwFlags- reserved, set to 0
NULL, // in- pvReserved- reserved, set to
// NULL
&EncodedAttributes); // out, optional- Pointer to
// attributes BLOB structure
if(fResult){ // TRUE returned- the subject was found in the CTL.
printf("The subject was found in the sorted CTL.\n");
}
else { // FALSE returned- the subject was not found in the CTL.
printf("The subject was not found in the sorted CTL.\n");
}
Windows NT: Requires version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in wincrypt.h.
Import Library: Use crypt32.lib.