In a OpenSSL's SSL/TLS client implementation, a structure SSL
is defined. For example here is usually the first few lines (from the link).
SSL_CTX* ctx = NULL;
BIO *web = NULL, *out = NULL;
SSL *ssl = NULL;
init_openssl_library();
I have been unable to find its structure in the header files from the OpenSSL library. How can I learn the contents of SSL * ssl
?
A context (CTX) structure is needed for each application that is running SSL. Each SSL session has an SSL structure, which points to a CTX structure. Both the CTX and SSL structures reside in heap storage.
SSL_CIPHER (SSL Cipher) This structure holds the algorithm information for a particular cipher which are a core part of the SSL/TLS protocol. The available ciphers are configured on a SSL_CTX basis and the actual ones used are then part of the SSL_SESSION.
I have been unable to find its structure type in the header files from the openssl library.
It's unclear which version of openssl you are referring too and how did you look but a grep -r ' SSL;' /usr/include/openssl/
quickly turned up a match in openssl/ossl_typ.h for openssl 1.0.2:
typedef struct ssl_st SSL;
A following grep for 'ssl_st' lead to its definition in openssl/ssl.h:
#ifndef OPENSSL_NO_SSL_INTERN
struct ssl_st
{
/* protocol version
* (one of SSL2_VERSION, SSL3_VERSION, TLS1_VERSION, DTLS1_VERSION)
*/
int version;
int type; /* SSL_ST_CONNECT or SSL_ST_ACCEPT */
...
Note that location and content of the structure might differ in other versions of openssl.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With