SSL_CTX_SET_TLSEXT_STATUS_CB - Online Linux Manual PageSection : 3
Updated : 2021-03-26
Source : 1.1.1k
Note : OpenSSL

NAMESSL_CTX_set_tlsext_status_cb, SSL_CTX_get_tlsext_status_cb, SSL_CTX_set_tlsext_status_arg, SSL_CTX_get_tlsext_status_arg, SSL_CTX_set_tlsext_status_type, SSL_CTX_get_tlsext_status_type, SSL_set_tlsext_status_type, SSL_get_tlsext_status_type, SSL_get_tlsext_status_ocsp_resp, SSL_set_tlsext_status_ocsp_resp ​− OCSP Certificate Status Request functions

SYNOPSIS​ #include <openssl/tls1.h> ​ ​ long SSL_CTX_set_tlsext_status_cb(SSL_CTX *ctx, int (*callback)(SSL *, void *)); ​ long SSL_CTX_get_tlsext_status_cb(SSL_CTX *ctx, int (**callback)(SSL *, void *)); ​ ​ long SSL_CTX_set_tlsext_status_arg(SSL_CTX *ctx, void *arg); ​ long SSL_CTX_get_tlsext_status_arg(SSL_CTX *ctx, void **arg); ​ ​ long SSL_CTX_set_tlsext_status_type(SSL_CTX *ctx, int type); ​ long SSL_CTX_get_tlsext_status_type(SSL_CTX *ctx); ​ ​ long SSL_set_tlsext_status_type(SSL *s, int type); ​ long SSL_get_tlsext_status_type(SSL *s); ​ ​ long SSL_get_tlsext_status_ocsp_resp(ssl, unsigned char **resp); ​ long SSL_set_tlsext_status_ocsp_resp(ssl, unsigned char *resp, int len);

DESCRIPTIONA client application may request that a server send back an OCSP status response (also known as OCSP stapling). To do so the client should call the ​SSL_CTX_set_tlsext_status_type() function prior to the creation of any SSL objects. Alternatively an application can call the SSL_set_tlsext_status_type() 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. Calling ​SSL_CTX_get_tlsext_status_type() will return the type TLSEXT_STATUSTYPE_ocsp previously set via SSL_CTX_set_tlsext_status_type() or −1 if not set. The client should additionally provide a callback function to decide what to do with the returned OCSP response by calling SSL_CTX_set_tlsext_status_cb(). 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 SSL_CTX_set_tlsext_status_arg(). 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 callback previously set via SSL_CTX_set_tlsext_status_cb() can be retrieved by calling SSL_CTX_get_tlsext_status_cb(), and the argument by calling ​SSL_CTX_get_tlsext_status_arg(). On the client side SSL_get_tlsext_status_type() can be used to determine whether the client has previously called SSL_set_tlsext_status_type(). It will return ​TLSEXT_STATUSTYPE_ocsp if it has been called or −1 otherwise. On the server side SSL_get_tlsext_status_type() can be used to determine whether the client requested OCSP stapling. If the client requested it then this function will return TLSEXT_STATUSTYPE_ocsp, or −1 otherwise. The response returned by the server can be obtained via a call to ​SSL_get_tlsext_status_ocsp_resp(). The value *resp will be updated to point to the OCSP response data and the return value will be the length of that data. Typically a callback would obtain an OCSP_RESPONSE object from this data via a call to the d2i_OCSP_RESPONSE() function. If the server has not provided any response data then *resp will be NULL and the return value from ​SSL_get_tlsext_status_ocsp_resp() will be −1. A server application must also call the SSL_CTX_set_tlsext_status_cb() 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 SSL_get_certificate(); obtain the OCSP response to be sent back; and then set that response data by calling SSL_set_tlsext_status_ocsp_resp(). 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.

RETURN VALUESThe 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 either ​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_CTX_set_tlsext_status_cb(), SSL_CTX_set_tlsext_status_arg(), ​SSL_CTX_set_tlsext_status_type(), SSL_set_tlsext_status_type() and ​SSL_set_tlsext_status_ocsp_resp() return 0 on error or 1 on success. SSL_CTX_get_tlsext_status_type() returns the value previously set by ​SSL_CTX_set_tlsext_status_type(), or −1 if not set. SSL_get_tlsext_status_ocsp_resp() returns the length of the OCSP response data or −1 if there is no OCSP response data. SSL_get_tlsext_status_type() returns TLSEXT_STATUSTYPE_ocsp on the client side if() was previously called, or on the server side if the client requested OCSP stapling. Otherwise −1 is returned.

HISTORYThe SSL_get_tlsext_status_type(), SSL_CTX_get_tlsext_status_type() and SSL_CTX_set_tlsext_status_type() functions were added in OpenSSL 1.1.0.

COPYRIGHTCopyright 2015−2016 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the License). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
0
Johanes Gumabo
Data Size   :   16,039 byte
man-SSL_get_tlsext_status_type.3sslBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   4 / 183,521
Visitor ID   :     :  
Visitor IP   :   52.14.140.108   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|S___SL_CTX_get_tlsext_status_arg.3ssl|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|S___SL_CTX_get_tlsext_status_arg.3ssl|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|S___SL_CTX_get_tlsext_status_arg.3ssl|43|br══─}─══|'br══─}─══ )         (htmlprn|149|S___SL_CTX_get_tlsext_status_arg.3ssl|43|'br══─}─══ |'br══─}─══ )