1SSL_CTX_set_tlsext_status_cb(3)     OpenSSL    SSL_CTX_set_tlsext_status_cb(3)
2
3
4

NAME

6       SSL_CTX_set_tlsext_status_cb, SSL_CTX_set_tlsext_status_arg,
7       SSL_set_tlsext_status_type, SSL_get_tlsext_status_ocsp_resp,
8       SSL_set_tlsext_status_ocsp_resp - OCSP Certificate Status Request
9       functions
10

SYNOPSIS

12        #include <openssl/tls1.h>
13
14        long SSL_CTX_set_tlsext_status_cb(SSL_CTX *ctx,
15                                          int (*callback)(SSL *, void *));
16        long SSL_CTX_set_tlsext_status_arg(SSL_CTX *ctx, void *arg);
17
18        long SSL_set_tlsext_status_type(SSL *s, int type);
19
20        long SSL_get_tlsext_status_ocsp_resp(ssl, unsigned char **resp);
21        long SSL_set_tlsext_status_ocsp_resp(ssl, unsigned char *resp, int len);
22

DESCRIPTION

24       A client application may request that a server send back an OCSP status
25       response (also known as OCSP stapling). To do so the client should call
26       the SSL_set_tlsext_status_type() function prior to the start of the
27       handshake.  Currently the only supported type is
28       TLSEXT_STATUSTYPE_ocsp. This value should be passed in the type
29       argument. The client should additionally provide a callback function to
30       decide what to do with the returned OCSP response by calling
31       SSL_CTX_set_tlsext_status_cb(). The callback function should determine
32       whether the returned OCSP response is acceptable or not. The callback
33       will be passed as an argument the value previously set via a call to
34       SSL_CTX_set_tlsext_status_arg(). Note that the callback will not be
35       called in the event of a handshake where session resumption occurs
36       (because there are no Certificates exchanged in such a handshake).
37
38       The response returned by the server can be obtained via a call to
39       SSL_get_tlsext_status_ocsp_resp(). The value *resp will be updated to
40       point to the OCSP response data and the return value will be the length
41       of that data.  Typically a callback would obtain an OCSP_RESPONSE
42       object from this data via a call to the d2i_OCSP_RESPONSE() function.
43       If the server has not provided any response data then *resp will be
44       NULL and the return value from SSL_get_tlsext_status_ocsp_resp() will
45       be -1.
46
47       A server application must also call the SSL_CTX_set_tlsext_status_cb()
48       function if it wants to be able to provide clients with OCSP
49       Certificate Status responses. Typically the server callback would
50       obtain the server certificate that is being sent back to the client via
51       a call to SSL_get_certificate(); obtain the OCSP response to be sent
52       back; and then set that response data by calling
53       SSL_set_tlsext_status_ocsp_resp(). A pointer to the response data
54       should be provided in the resp argument, and the length of that data
55       should be in the len argument.
56

RETURN VALUES

58       The callback when used on the client side should return a negative
59       value on error; 0 if the response is not acceptable (in which case the
60       handshake will fail) or a positive value if it is acceptable.
61
62       The callback when used on the server side should return with either
63       SSL_TLSEXT_ERR_OK (meaning that the OCSP response that has been set
64       should be returned), SSL_TLSEXT_ERR_NOACK (meaning that an OCSP
65       response should not be returned) or SSL_TLSEXT_ERR_ALERT_FATAL (meaning
66       that a fatal error has occurred).
67
68       SSL_CTX_set_tlsext_status_cb(), SSL_CTX_set_tlsext_status_arg(),
69       SSL_set_tlsext_status_type() and SSL_set_tlsext_status_ocsp_resp()
70       return 0 on error or 1 on success.
71
72       SSL_get_tlsext_status_ocsp_resp() returns the length of the OCSP
73       response data or -1 if there is no OCSP response data.
74
75
76
771.0.2o                            2019-09-10   SSL_CTX_set_tlsext_status_cb(3)
Impressum