|SSL_CTX_SET_TLSEXT_STATUS_CB(3)||Library Functions Manual||SSL_CTX_SET_TLSEXT_STATUS_CB(3)|
OCSP Certificate Status Request functions
*ctx, int (*callback)(SSL *, void *));
*ctx, void *arg);
*s, int type);
unsigned char **resp);
unsigned char *resp, int
A client application may request that a server send back an OCSP
status response (also known as OCSP stapling). To do so the client should
function on an individual SSL object prior to the
start of the handshake. Currently the only supported type is
TLSEXT_STATUSTYPE_ocsp. This value should be passed
in the type argument.
The client should additionally
provide a callback function to decide what to do with the returned OCSP
response by calling
The callback function should determine whether the returned OCSP response is
acceptable or not. The callback will be passed as an argument the value
previously set via a call to
Note that the callback will not be called in the event of a handshake where
session resumption occurs (because there are no Certificates exchanged in
such a handshake).
The response returned by the
server can be obtained via a call to
The value *resp will be updated to point to the OCSP
response data and the return value will be the length of that data. If the
server has not provided any response data, then *resp
NULL and the return value from
SSL_get_tlsext_status_ocsp_resp() will be -1.
A server application must also
function if it wants to be able to provide clients with OCSP Certificate
Status responses. Typically the server callback would obtain the server
certificate that is being sent back to the client via a call to
obtain the OCSP response to be sent back, and then set that response data by
A pointer to the response data should be provided in the
resp argument, and the length of that data should be
in the len argument.
The callback when used on the client side should return a negative value on error, 0 if the response is not acceptable (in which case the handshake will fail), or a positive value if it is acceptable.
The callback when used on the server side should return with
SSL_TLSEXT_ERR_OK (meaning that the OCSP
response that has been set should be returned),
SSL_TLSEXT_ERR_NOACK (meaning that an OCSP response
should not be returned), or
SSL_TLSEXT_ERR_ALERT_FATAL (meaning that a fatal
error has occurred).
SSL_set_tlsext_status_ocsp_resp() return 0 on error
or 1 on success.
the length of the OCSP response data or -1 if there is no OCSP response
|December 1, 2016||OpenBSD-6.1|