gnutls_certificate_set_ocsp_status_request_function2 - Linux
Overview
gnutls_certificate_set_ocsp_status_request_function2
is a function that sets the OCSP (Online Certificate Status Protocol) status request function to be used for this certificate.
Syntax
gnutls_certificate_set_ocsp_status_request_function2(certificate, callback)
- certificate: The certificate to set the OCSP status request function for.
- callback: The callback function to be used to request the OCSP status.
Options/Flags
The following callback is used:
int (*callback) (gnutls_certificate_t certificate, const char *hostname, void *user_data)
- certificate: The certificate to check the status of.
- hostname: The hostname of the server that issued the certificate.
- user_data: A user-provided pointer that will be passed to the callback.
Examples
The following example shows how to set the OCSP status request function:
gnutls_certificate_set_ocsp_status_request_function2(certificate, ocsp_status_request_function);
Common Issues
- If the OCSP status request function is not set, the OCSP status will not be checked.
- If the OCSP status request function returns an error, the OCSP status will not be checked.
Integration
gnutls_certificate_set_ocsp_status_request_function2
can be used with other GnuTLS functions to check the status of certificates. For example, it can be used with gnutls_certificate_verify
to verify a certificate.
Related Commands
gnutls_certificate_set_ocsp_status_request_function
gnutls_ocsp_request_new
gnutls_ocsp_request_verify