The CTL_FIND_USAGE_PARA structure is a member of the CTL_FIND_SUBJECT_PARA structure and it is used by CertFindCTLInStore.
typedef struct _CTL_FIND_USAGE_PARA {
DWORD cbSize;
CTL_USAGE SubjectUsage; // optional
CRYPT_DATA_BLOB ListIdentifier; // optional
PCERT_INFO pSigner; // optional
} CTL_FIND_USAGE_PARA, *PCTL_FIND_USAGE_PARA;
A found CTL must contain all the usage object identifiers specified by SubjectUsage.
SubjectUsage.cUsageIdentifier can be set to zero to match any usage.
If you want to match only lists that have no ListIdentifier then ListIdentifier.cbData should be set to CTL_FIND_NO_LIST_ID_CBDATA to match CTLs with no specified ListIdentifier.
If the issuer creates multiple trust lists for the same SubjectUsage in a CTL_INFO structure, then, the ListIdentifier must be specified to distinguish between them.
To match any signer, NULL may be used. To match CTLs that don't have any signers, specify CTL_FIND_NO_SIGNER_PTR.
The CertEncodingType of the signer is obtained from the dwMsgAndCertEncodingType parameter of CertFindCTLInStore.
BLOB Structure, CERT_INFO, CTL_FIND_SUBJECT_PARA, CTL_USAGE, CertFindCTLInStore