wolfSSL Manual

Docs -> wolfSSL Manual

Chapter 17: wolfSSL API Reference


17.6  OCSP / CRL


The functions in this section have to do with using OCSP (Online Certificate Status Protocol) and CRL (Certificate Revocation List) with wolfSSL.






CyaSSL_CTX_OCSP_set_options


Synopsis:

long CyaSSL_CTX_OCSP_set_options(CYASSL_CTX* ctx, long options);


Description:

This function sets options to configure behavior of OCSP functionality in CyaSSL.  The value of options if formed by or’ing one or more of the following options:


CYASSL_OCSP_ENABLE

  1. - enable OCSP lookups


CYASSL_OCSP_URL_OVERRIDE

  1. - use the override URL instead of the URL in certificates.


The override URL is specified using the CyaSSL_CTX_OCSP_set_override_url() function.


This function only sets the OCSP options when CyaSSL has been compiled with OCSP support (--enable-ocsp, #define HAVE_OCSP).


Return Values:


SSL_SUCCESS is returned upon success


SSL_FAILURE is returned upon failure


NOT_COMPILED_IN is returned when this function has been called, but OCSP support was not enabled when CyaSSL was compiled.


Parameters:


ctx - pointer to the SSL context, created with CyaSSL_CTX_new().


options - value used to set the OCSP options.


Example:


CYASSL_CTX* ctx = 0;

...

CyaSSL_CTX_OCSP_set_options(ctx, CYASSL_OCSP_ENABLE);


See Also:

CyaSSL_CTX_OCSP_set_override_url






CyaSSL_CTX_OCSP_set_override_url


Synopsis:

int  CyaSSL_CTX_OCSP_set_override_url(CYASSL_CTX* ctx, const char* url);


Description:

This function manually sets the URL for OCSP to use.  By default, OCSP will use the URL found in the individual certificate unless the CYASSL_OCSP_URL_OVERRIDE option is set using the CyaSSL_CTX_OCSP_set_options function.


Return Values:


SSL_SUCCESS is returned upon success


SSL_FAILURE is returned upon failure


NOT_COMPILED_IN is returned when this function has been called, but OCSP support was not enabled when CyaSSL was compiled.


Parameters:


ctx - pointer to the SSL context, created with CyaSSL_CTX_new().


url - pointer to the OCSP URL for CyaSSL to use.


Example:


CYASSL_CTX* ctx = 0;

...

CyaSSL_CTX_OCSP_set_override_url(ctx, “custom-url-here”);


See Also:

CyaSSL_CTX_OCSP_set_options




 

Questions? +1 (425) 245-8247