CertGetServerOcspResponseContext function
The CertGetServerOcspResponseContext function retrieves a non-blocking, time valid online certificate status protocol (OCSP) response context for the specified handle.
Syntax
PCCERT_SERVER_OCSP_RESPONSE_CONTEXT WINAPI CertGetServerOcspResponseContext( _In_ HCERT_SERVER_OCSP_RESPONSE hServerOcspResponse, _In_ DWORD dwFlags, _Reserved_ LPVOID pvReserved );
Parameters
- hServerOcspResponse [in]
-
The OCSP server response handle for which to retrieve a response context. This handle is returned by the CertOpenServerOcspResponse function.
- dwFlags [in]
-
This parameter is reserved for future use and must be zero.
- pvReserved
-
This parameter is reserved for future use and must be NULL.
Return value
If the function succeeds, it returns a pointer to a CERT_SERVER_OCSP_RESPONSE_CONTEXT structure.
For a response to be time valid, the current time on the system hosting this function call must be less than the next update time for the certificate revocation list (CRL) context. When a time valid OCSP response is not available, this function returns NULL with the last error set to CRYPT_E_REVOCATION_OFFLINE.
Remarks
If you use the CertGetServerOcspResponseContext function to create multiple references to an OCSP response context, you must call CertAddRefServerOcspResponseContext to increment the reference count for the CERT_SERVER_OCSP_RESPONSE_CONTEXT structure. When you have finished using the structure, you must free it by calling the CertFreeServerOcspResponseContext function.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|