CertEnumCRLsInStore function
The CertEnumCRLsInStore function retrieves the first or next certificate revocation list (CRL) context in a certificate store. Used in a loop, this function can retrieve in sequence all CRL contexts in a certificate store.
Syntax
PCCRL_CONTEXT WINAPI CertEnumCRLsInStore( _In_ HCERTSTORE hCertStore, _In_ PCCRL_CONTEXT pPrevCrlContext );
Parameters
- hCertStore [in]
-
Handle of a certificate store.
- pPrevCrlContext [in]
-
A pointer to the previous CRL_CONTEXT structure found. The pPrevCrlContext parameter must be NULL to get the first CRL in the store. Successive CRLs are enumerated by setting pPrevCrlContext to the pointer returned by a previous call to the function. This function frees the CRL_CONTEXT referenced by non-NULL values of this parameter. The enumeration skips any CRLs previously deleted by CertDeleteCRLFromStore.
Return value
If the function succeeds, the return value is a pointer to the next CRL_CONTEXT in the store.
NULL is returned if the function fails. For extended error information, call GetLastError. Some possible error codes follow.
| Return code | Description |
|---|---|
|
The handle in the hCertStore parameter is not the same as that in the certificate context pointed to by pPrevCrlContext. |
|
No CRL was found. This happens if the store is empty or the end of the store's list is reached. |
Remarks
The returned pointer is freed when it is passed as the pPrevCrlContext on a subsequent call to the function. Otherwise, the pointer must explicitly be freed by calling CertFreeCRLContext. A pPrevCrlContext that is not NULL is always freed when passed to this function through a call to CertFreeCRLContext, even if the function itself returns an error.
A duplicate of the CRL context returned by this function can be made by calling CertDuplicateCRLContext.
Requirements
|
Minimum supported client |
Windows XP [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- Certificate Revocation List Functions
- CertDeleteCRLFromStore
- CertDuplicateCRLContext
- CertFindCRLInStore
- CertFreeCRLContext
- CRL_CONTEXT
- GetLastError