SSL_CTX_set_ex_data.3ssl - Man Page

Store and retrieve extra data from the SSL_CTX, SSL or SSL_SESSION


 #include <openssl/ssl.h>

 void *SSL_CTX_get_ex_data(const SSL_CTX *s, int idx);

 int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg);

 void *SSL_get_ex_data(const SSL *s, int idx);

 int SSL_set_ex_data(SSL *s, int idx, void *arg);


SSL*_set_ex_data() functions can be used to store arbitrary user data into the SSL_CTX, or SSL object. The user must supply a unique index which they can subsequently use to retrieve the data using SSL*_get_ex_data().

For more detailed information see CRYPTO_get_ex_data(3) and CRYPTO_set_ex_data(3) which implement these functions and CRYPTO_get_ex_new_index(3) for generating a unique index.

Return Values

The SSL*_set_ex_data() functions return 1 if the item is successfully stored and 0 if it is not. The SSL*_get_ex_data() functions return the ex_data pointer if successful, otherwise NULL.

See Also

CRYPTO_get_ex_data(3), CRYPTO_set_ex_data(3), CRYPTO_get_ex_new_index(3)

Referenced By

The man pages SSL_CTX_get_ex_data.3ssl(3), SSL_get_ex_data.3ssl(3) and SSL_set_ex_data.3ssl(3) are aliases of SSL_CTX_set_ex_data.3ssl(3).

2023-02-06 1.1.1q OpenSSL