ocsp.h
Functions
| Name | |
|---|---|
| WOLFSSL_OCSP * | wc_NewOCSP(WOLFSSL_CERT_MANAGER * cm) Allocates and initialises an OCSP context. |
| void | wc_FreeOCSP(WOLFSSL_OCSP * ocsp) Frees resources associated with an OCSP context. |
| int | wc_CheckCertOcspResponse(WOLFSSL_OCSP * ocsp, DecodedCert * cert, byte * response, int responseSz, void * heap) Checks the OCSP response for a given certificate. |
Functions Documentation
function wc_NewOCSP
WOLFSSL_OCSP * wc_NewOCSP(
WOLFSSL_CERT_MANAGER * cm
)
Allocates and initialises an OCSP context.
Parameters:
- cm Pointer to the certificate manager.
See: wc_FreeOCSP
Return:
- Pointer to allocated WOLFSSL_OCSP on success
- NULL on failure
This function allocates and initialises a WOLFSSL_OCSP structure for use with OCSP operations.
function wc_FreeOCSP
void wc_FreeOCSP(
WOLFSSL_OCSP * ocsp
)
Frees resources associated with an OCSP context.
Parameters:
- ocsp Pointer to the WOLFSSL_OCSP structure to free.
See: wc_NewOCSP
Return: void
This function releases any resources associated with a WOLFSSL_OCSP structure.
function wc_CheckCertOcspResponse
int wc_CheckCertOcspResponse(
WOLFSSL_OCSP * ocsp,
DecodedCert * cert,
byte * response,
int responseSz,
void * heap
)
Checks the OCSP response for a given certificate.
Parameters:
- ocsp Pointer to the WOLFSSL_OCSP structure.
- cert Pointer to the decoded certificate.
- response Pointer to the OCSP response buffer.
- responseSz Size of the OCSP response buffer.
- heap Optional heap pointer.
Return:
- 0 on success
- <0 on failure
This function verifies an OCSP response for a specific certificate.
Source code
WOLFSSL_OCSP* wc_NewOCSP(WOLFSSL_CERT_MANAGER* cm);
void wc_FreeOCSP(WOLFSSL_OCSP* ocsp);
int wc_CheckCertOcspResponse(WOLFSSL_OCSP *ocsp, DecodedCert *cert, byte *response, int responseSz, void* heap);
Updated on 2025-11-12 at 01:14:40 +0000