[−][src]Module mesalink::libssl::ssl
Implementations of OpenSSL SSL APIs. Please also refer to the header file at mesalink/openssl/ssl.h
Synopsis
This sub-module implements the necessary APIs to establish a TLS session. All the APIs are compatible to their OpenSSL counterparts.
Usage
The first step is to create a SSL_CTX
object with SSL_CTX_new
.
Then SSL_CTX_use_certificate_chain_file
and SSL_CTX_use_PrivateKey_file
must be called to set up the certificate and private key if the context is
to be used in a TLS server.
When a TCP socket has been created, an SSL
object can be created with
SSL_new
. Afterwards, the socket can be assigned to the SSL
object with
SSL_set_fd
.
Then the TLS handshake is performed using SSL_connect
or SSL_accept
for
a client or a server respectively. SSL_read
and SSL_write
are used to
read and write data on the TLS connection. Finally, SSL_shutdown
can be
used to shut down the connection.
Structs
MESALINK_CIPHER | An OpenSSL Cipher object |
MESALINK_CTX | A global context structure which is created by a server or a client once per
program. It holds default values for |
MESALINK_METHOD | A dispatch structure describing the internal ssl library methods/functions which implement the various protocol versions such as TLS v1.2. |
MESALINK_SSL | The main TLS structure which is created by a server or client per established connection. |
Functions
mesalink_SSL_CIPHER_get_bits |
|
mesalink_SSL_CIPHER_get_name |
|
mesalink_SSL_CIPHER_get_version |
|
mesalink_SSL_CTX_add_extra_chain_cert | |
mesalink_SSL_CTX_check_private_key |
|
mesalink_SSL_CTX_free |
|
mesalink_SSL_CTX_get_session_cache_mode |
|
mesalink_SSL_CTX_load_verify_locations |
|
mesalink_SSL_CTX_new |
|
mesalink_SSL_CTX_sess_get_cache_size |
|
mesalink_SSL_CTX_sess_set_cache_size |
|
mesalink_SSL_CTX_set_session_cache_mode |
|
mesalink_SSL_CTX_use_PrivateKey |
|
mesalink_SSL_CTX_use_PrivateKey_ASN1 |
|
mesalink_SSL_CTX_use_PrivateKey_file |
|
mesalink_SSL_CTX_use_certificate |
|
mesalink_SSL_CTX_use_certificate_ASN1 |
|
mesalink_SSL_CTX_use_certificate_chain_file |
|
mesalink_SSL_accept |
|
mesalink_SSL_check_private_key |
|
mesalink_SSL_connect |
|
mesalink_SSL_connect0 |
|
mesalink_SSL_do_handshake |
|
mesalink_SSL_flush |
|
mesalink_SSL_free |
|
mesalink_SSL_get_SSL_CTX |
|
mesalink_SSL_get_cipher |
|
mesalink_SSL_get_cipher_bits |
|
mesalink_SSL_get_cipher_name |
|
mesalink_SSL_get_cipher_version |
|
mesalink_SSL_get_current_cipher |
|
mesalink_SSL_get_early_data_status |
|
mesalink_SSL_get_error |
|
mesalink_SSL_get_fd |
|
mesalink_SSL_get_peer_certificate |
|
mesalink_SSL_get_peer_certificates |
|
mesalink_SSL_get_version |
|
mesalink_SSL_init_logger |
|
mesalink_SSL_is_server |
|
mesalink_SSL_load_error_strings | For OpenSSL compatibility only. |
mesalink_SSL_new |
|
mesalink_SSL_read |
|
mesalink_SSL_set_SSL_CTX |
|
mesalink_SSL_set_accept_state |
|
mesalink_SSL_set_connect_state |
|
mesalink_SSL_set_fd |
|
mesalink_SSL_set_tlsext_host_name |
|
mesalink_SSL_shutdown |
|
mesalink_SSL_use_PrivateKey_ASN1 |
|
mesalink_SSL_use_certificate_ASN1 |
|
mesalink_SSL_write |
|
mesalink_SSL_write_early_data |
|
mesalink_SSLv3_client_method | This SSL/TLS version is not supported. Always return NULL. |
mesalink_SSLv3_server_method | This SSL/TLS version is not supported. Always return NULL. |
mesalink_SSLv23_client_method | A general-purpose version-flexible SSL/TLS method. The supported protocols are TLSv1.2 and TLSv1.3. |
mesalink_SSLv23_server_method | A general-purpose version-flexible SSL/TLS method. The supported protocols are TLSv1.2 and TLSv1.3. |
mesalink_TLS_client_method | A general-purpose version-flexible SSL/TLS method. The supported protocols are TLSv1.2 and TLSv1.3. |
mesalink_TLS_method | A general-purpose version-flexible SSL/TLS method. The supported protocols are TLSv1.2 and TLSv1.3. |
mesalink_TLS_server_method | A general-purpose version-flexible SSL/TLS method. The supported protocol is TLSv1.2. |
mesalink_TLSv1_client_method | This SSL/TLS version is not supported. Always return NULL. |
mesalink_TLSv1_server_method | This SSL/TLS version is not supported. Always return NULL. |
mesalink_TLSv1_1_client_method | This SSL/TLS version is not supported. Always return NULL. |
mesalink_TLSv1_1_server_method | This SSL/TLS version is not supported. Always return NULL. |
mesalink_TLSv1_2_client_method | Version-specific method APIs. A TLS/SSL connection established with these methods will only understand the TLSv1.2 protocol. |
mesalink_TLSv1_2_server_method | Version-specific method APIs. A TLS/SSL connection established with these methods will only understand the TLSv1.2 protocol. |
mesalink_add_ssl_algorithms | For OpenSSL compatibility only. Always returns 1. |
mesalink_library_init | For OpenSSL compatibility only. Always returns 1. |