ssl.7ossl - Man Page

OpenSSL SSL/TLS library

Synopsis

See the individual manual pages for details.

Description

The OpenSSL ssl library implements several versions of the Secure Sockets Layer, Transport Layer Security, and Datagram Transport Layer Security protocols. This page gives a brief overview of the extensive API and data types provided by the library.

An SSL_CTX object is created as a framework to establish TLS/SSL enabled connections (see SSL_CTX_new(3)). Various options regarding certificates, algorithms etc. can be set in this object.

When a network connection has been created, it can be assigned to an SSL object. After the SSL object has been created using SSL_new(3), SSL_set_fd(3) or SSL_set_bio(3) can be used to associate the network connection with the object.

When the TLS/SSL handshake is performed using SSL_accept(3) or SSL_connect(3) respectively. SSL_read_ex(3), SSL_read(3), SSL_write_ex(3) and SSL_write(3) are used to read and write data on the TLS/SSL connection. SSL_shutdown(3) can be used to shut down the TLS/SSL connection.

Data Structures

Here are some of the main data structures in the library.

SSL_METHOD (SSL Method)

This is a dispatch structure describing the internal ssl library methods/functions which implement the various protocol versions (SSLv3 TLSv1, ...). It's needed to create an SSL_CTX.

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.

SSL_CTX (SSL Context)

This is the global context structure which is created by a server or client once per program life-time and which holds mainly default values for the SSL structures which are later created for the connections.

SSL_SESSION (SSL Session)

This is a structure containing the current TLS/SSL session details for a connection: SSL_CIPHERs, client and server certificates, keys, etc.

SSL (SSL Connection)

This is the main SSL/TLS structure which is created by a server or client per established connection. This actually is the core structure in the SSL API. At run-time the application usually deals with this structure which has links to mostly all other structures.

Header Files

Currently the OpenSSL ssl library provides the following C header files containing the prototypes for the data structures and functions:

<openssl/ssl.h>

This is the common header file for the SSL/TLS API.  Include it into your program to make the API of the ssl library available. It internally includes both more private SSL headers and headers from the crypto library. Whenever you need hard-core details on the internals of the SSL API, look inside this header file. This file also includes the others listed below.

<openssl/ssl2.h>

Unused. Present for backwards compatibility only.

<openssl/ssl3.h>

This is the sub header file dealing with the SSLv3 protocol only.

<openssl/tls1.h>

This is the sub header file dealing with the TLSv1 protocol only.

Referenced By

BIO_s_bio.3ossl(3), BIO_s_bio.3ssl(3), crypto.7ossl(7), d2i_SSL_SESSION.3ossl(3), d2i_SSL_SESSION.3ssl(3), DTLSv1_listen.3ossl(3), DTLSv1_listen.3ssl(3), openssl.1ossl(1), openssl-ciphers.1ossl(1), SSL_accept.3ossl(3), SSL_accept.3ssl(3), SSL_alert_type_string.3ossl(3), SSL_alert_type_string.3ssl(3), SSL_alloc_buffers.3ossl(3), SSL_check_chain.3ossl(3), SSL_check_chain.3ssl(3), SSL_CIPHER_get_name.3ossl(3), SSL_CIPHER_get_name.3ssl(3), SSL_clear.3ossl(3), SSL_clear.3ssl(3), SSL_COMP_add_compression_method.3ossl(3), SSL_COMP_add_compression_method.3ssl(3), SSL_CONF_cmd.3ossl(3), SSL_CONF_cmd_argv.3ossl(3), SSL_CONF_CTX_new.3ossl(3), SSL_CONF_CTX_set1_prefix.3ossl(3), SSL_CONF_CTX_set_flags.3ossl(3), SSL_CONF_CTX_set_ssl_ctx.3ossl(3), SSL_connect.3ossl(3), SSL_connect.3ssl(3), SSL_CTX_add1_chain_cert.3ossl(3), SSL_CTX_add_extra_chain_cert.3ossl(3), SSL_CTX_add_extra_chain_cert.3ssl(3), SSL_CTX_add_session.3ossl(3), SSL_CTX_add_session.3ssl(3), SSL_CTX_config.3ossl(3), SSL_CTX_ctrl.3ossl(3), SSL_CTX_ctrl.3ssl(3), SSL_CTX_dane_enable.3ossl(3), SSL_CTX_flush_sessions.3ossl(3), SSL_CTX_flush_sessions.3ssl(3), SSL_CTX_free.3ossl(3), SSL_CTX_free.3ssl(3), SSL_CTX_get0_param.3ossl(3), SSL_CTX_get_verify_mode.3ossl(3), SSL_CTX_get_verify_mode.3ssl(3), SSL_CTX_has_client_custom_ext.3ossl(3), SSL_CTX_has_client_custom_ext.3ssl(3), SSL_CTX_load_verify_locations.3ossl(3), SSL_CTX_load_verify_locations.3ssl(3), SSL_CTX_new.3ossl(3), SSL_CTX_new.3ssl(3), SSL_CTX_sessions.3ossl(3), SSL_CTX_sessions.3ssl(3), SSL_CTX_sess_number.3ossl(3), SSL_CTX_sess_number.3ssl(3), SSL_CTX_sess_set_cache_size.3ossl(3), SSL_CTX_sess_set_cache_size.3ssl(3), SSL_CTX_sess_set_get_cb.3ossl(3), SSL_CTX_sess_set_get_cb.3ssl(3), SSL_CTX_set0_CA_list.3ossl(3), SSL_CTX_set0_CA_list.3ssl(3), SSL_CTX_set1_curves.3ossl(3), SSL_CTX_set1_sigalgs.3ossl(3), SSL_CTX_set1_sigalgs.3ssl(3), SSL_CTX_set1_verify_cert_store.3ossl(3), SSL_CTX_set_alpn_select_cb.3ossl(3), SSL_CTX_set_alpn_select_cb.3ssl(3), SSL_CTX_set_cert_cb.3ossl(3), SSL_CTX_set_cert_cb.3ssl(3), SSL_CTX_set_cert_store.3ossl(3), SSL_CTX_set_cert_store.3ssl(3), SSL_CTX_set_cert_verify_callback.3ossl(3), SSL_CTX_set_cert_verify_callback.3ssl(3), SSL_CTX_set_cipher_list.3ossl(3), SSL_CTX_set_cipher_list.3ssl(3), SSL_CTX_set_client_cert_cb.3ossl(3), SSL_CTX_set_client_cert_cb.3ssl(3), SSL_CTX_set_client_hello_cb.3ossl(3), SSL_CTX_set_client_hello_cb.3ssl(3), SSL_CTX_set_ctlog_list_file.3ossl(3), SSL_CTX_set_ctlog_list_file.3ssl(3), SSL_CTX_set_ct_validation_callback.3ossl(3), SSL_CTX_set_ct_validation_callback.3ssl(3), SSL_CTX_set_default_passwd_cb.3ossl(3), SSL_CTX_set_default_passwd_cb.3ssl(3), SSL_CTX_set_generate_session_id.3ossl(3), SSL_CTX_set_generate_session_id.3ssl(3), SSL_CTX_set_info_callback.3ossl(3), SSL_CTX_set_info_callback.3ssl(3), SSL_CTX_set_keylog_callback.3ossl(3), SSL_CTX_set_keylog_callback.3ssl(3), SSL_CTX_set_max_cert_list.3ossl(3), SSL_CTX_set_max_cert_list.3ssl(3), SSL_CTX_set_min_proto_version.3ossl(3), SSL_CTX_set_mode.3ossl(3), SSL_CTX_set_mode.3ssl(3), SSL_CTX_set_msg_callback.3ossl(3), SSL_CTX_set_msg_callback.3ssl(3), SSL_CTX_set_num_tickets.3ossl(3), SSL_CTX_set_options.3ossl(3), SSL_CTX_set_options.3ssl(3), SSL_CTX_set_psk_client_callback.3ossl(3), SSL_CTX_set_quiet_shutdown.3ossl(3), SSL_CTX_set_quiet_shutdown.3ssl(3), SSL_CTX_set_read_ahead.3ossl(3), SSL_CTX_set_read_ahead.3ssl(3), SSL_CTX_set_record_padding_callback.3ossl(3), SSL_CTX_set_record_padding_callback.3ssl(3), SSL_CTX_set_security_level.3ossl(3), SSL_CTX_set_session_cache_mode.3ossl(3), SSL_CTX_set_session_cache_mode.3ssl(3), SSL_CTX_set_session_id_context.3ossl(3), SSL_CTX_set_session_id_context.3ssl(3), SSL_CTX_set_session_ticket_cb.3ossl(3), SSL_CTX_set_session_ticket_cb.3ssl(3), SSL_CTX_set_split_send_fragment.3ossl(3), SSL_CTX_set_srp_password.3ossl(3), SSL_CTX_set_ssl_version.3ossl(3), SSL_CTX_set_ssl_version.3ssl(3), SSL_CTX_set_stateless_cookie_generate_cb.3ossl(3), SSL_CTX_set_timeout.3ossl(3), SSL_CTX_set_timeout.3ssl(3), SSL_CTX_set_tlsext_servername_callback.3ossl(3), SSL_CTX_set_tlsext_servername_callback.3ssl(3), SSL_CTX_set_tlsext_status_cb.3ossl(3), SSL_CTX_set_tlsext_ticket_key_cb.3ossl(3), SSL_CTX_set_tlsext_ticket_key_cb.3ssl(3), SSL_CTX_set_tlsext_use_srtp.3ossl(3), SSL_CTX_set_tmp_dh_callback.3ossl(3), SSL_CTX_set_tmp_dh_callback.3ssl(3), SSL_CTX_set_tmp_ecdh.3ossl(3), SSL_CTX_set_verify.3ossl(3), SSL_CTX_set_verify.3ssl(3), SSL_CTX_use_certificate.3ossl(3), SSL_CTX_use_certificate.3ssl(3), SSL_CTX_use_psk_identity_hint.3ossl(3), SSL_CTX_use_serverinfo.3ossl(3), SSL_do_handshake.3ossl(3), SSL_do_handshake.3ssl(3), SSL_export_keying_material.3ossl(3), SSL_extension_supported.3ossl(3), SSL_free.3ossl(3), SSL_free.3ssl(3), SSL_get0_peer_scts.3ossl(3), SSL_get0_peer_scts.3ssl(3), SSL_get_all_async_fds.3ossl(3), SSL_get_ciphers.3ossl(3), SSL_get_ciphers.3ssl(3), SSL_get_client_random.3ossl(3), SSL_get_client_random.3ssl(3), SSL_get_current_cipher.3ossl(3), SSL_get_current_cipher.3ssl(3), SSL_get_default_timeout.3ossl(3), SSL_get_default_timeout.3ssl(3), SSL_get_error.3ossl(3), SSL_get_error.3ssl(3), SSL_get_extms_support.3ossl(3), SSL_get_extms_support.3ssl(3), SSL_get_fd.3ossl(3), SSL_get_fd.3ssl(3), SSL_get_peer_cert_chain.3ossl(3), SSL_get_peer_cert_chain.3ssl(3), SSL_get_peer_certificate.3ossl(3), SSL_get_peer_certificate.3ssl(3), SSL_get_peer_signature_nid.3ossl(3), SSL_get_peer_signature_nid.3ssl(3), SSL_get_peer_tmp_key.3ossl(3), SSL_get_peer_tmp_key.3ssl(3), SSL_get_psk_identity.3ossl(3), SSL_get_rbio.3ossl(3), SSL_get_rbio.3ssl(3), SSL_get_session.3ossl(3), SSL_get_session.3ssl(3), SSL_get_shared_sigalgs.3ossl(3), SSL_get_shared_sigalgs.3ssl(3), SSL_get_SSL_CTX.3ossl(3), SSL_get_SSL_CTX.3ssl(3), SSL_get_verify_result.3ossl(3), SSL_get_verify_result.3ssl(3), SSL_get_version.3ossl(3), SSL_get_version.3ssl(3), SSL_group_to_name.3ossl(3), SSL_in_init.3ossl(3), SSL_in_init.3ssl(3), SSL_key_update.3ossl(3), SSL_key_update.3ssl(3), SSL_library_init.3ossl(3), SSL_library_init.3ssl(3), SSL_load_client_CA_file.3ossl(3), SSL_load_client_CA_file.3ssl(3), SSL_new.3ossl(3), SSL_new.3ssl(3), SSL_pending.3ossl(3), SSL_pending.3ssl(3), SSL_read.3ossl(3), SSL_read.3ssl(3), SSL_read_early_data.3ossl(3), SSL_read_early_data.3ssl(3), SSL_rstate_string.3ossl(3), SSL_rstate_string.3ssl(3), SSL_SESSION_free.3ossl(3), SSL_SESSION_free.3ssl(3), SSL_SESSION_get0_cipher.3ossl(3), SSL_SESSION_get0_cipher.3ssl(3), SSL_SESSION_get0_hostname.3ossl(3), SSL_SESSION_get0_hostname.3ssl(3), SSL_SESSION_get0_id_context.3ossl(3), SSL_SESSION_get0_id_context.3ssl(3), SSL_SESSION_get0_peer.3ossl(3), SSL_SESSION_get0_peer.3ssl(3), SSL_SESSION_get_compress_id.3ossl(3), SSL_SESSION_get_compress_id.3ssl(3), SSL_SESSION_get_ex_data.3ssl(3), SSL_SESSION_get_protocol_version.3ossl(3), SSL_SESSION_get_protocol_version.3ssl(3), SSL_SESSION_get_time.3ossl(3), SSL_SESSION_get_time.3ssl(3), SSL_SESSION_has_ticket.3ossl(3), SSL_SESSION_has_ticket.3ssl(3), SSL_SESSION_is_resumable.3ossl(3), SSL_SESSION_is_resumable.3ssl(3), SSL_SESSION_print.3ossl(3), SSL_SESSION_print.3ssl(3), SSL_session_reused.3ossl(3), SSL_session_reused.3ssl(3), SSL_SESSION_set1_id.3ossl(3), SSL_SESSION_set1_id.3ssl(3), SSL_set1_host.3ossl(3), SSL_set_async_callback.3ossl(3), SSL_set_bio.3ossl(3), SSL_set_bio.3ssl(3), SSL_set_connect_state.3ossl(3), SSL_set_connect_state.3ssl(3), SSL_set_fd.3ossl(3), SSL_set_fd.3ssl(3), SSL_set_session.3ossl(3), SSL_set_session.3ssl(3), SSL_set_shutdown.3ossl(3), SSL_set_shutdown.3ssl(3), SSL_set_verify_result.3ossl(3), SSL_set_verify_result.3ssl(3), SSL_shutdown.3ossl(3), SSL_shutdown.3ssl(3), SSL_state_string.3ossl(3), SSL_state_string.3ssl(3), SSL_want.3ossl(3), SSL_want.3ssl(3), SSL_write.3ossl(3), SSL_write.3ssl(3).

2021-09-09 3.0.0 OpenSSL