2000-01-21 23:58:03 +00:00
|
|
|
=pod
|
|
|
|
|
|
|
|
=head1 NAME
|
|
|
|
|
2016-11-11 09:33:55 +01:00
|
|
|
ssl - OpenSSL SSL/TLS library
|
2000-01-21 23:58:03 +00:00
|
|
|
|
2016-05-31 12:20:08 -04:00
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
|
|
See the individual manual pages for details.
|
|
|
|
|
2000-10-19 19:40:35 +00:00
|
|
|
=head1 DESCRIPTION
|
2000-01-21 23:58:03 +00:00
|
|
|
|
|
|
|
The OpenSSL B<ssl> library implements the Secure Sockets Layer (SSL v2/v3) and
|
|
|
|
Transport Layer Security (TLS v1) protocols. It provides a rich API which is
|
|
|
|
documented here.
|
|
|
|
|
2017-12-12 13:14:45 +01:00
|
|
|
An B<SSL_CTX> object is created as a framework to establish
|
2015-08-17 15:21:33 -04:00
|
|
|
TLS/SSL enabled connections (see L<SSL_CTX_new(3)>).
|
2000-10-18 23:08:55 +00:00
|
|
|
Various options regarding certificates, algorithms etc. can be set
|
|
|
|
in this object.
|
2000-01-21 23:58:03 +00:00
|
|
|
|
2000-10-18 23:08:55 +00:00
|
|
|
When a network connection has been created, it can be assigned to an
|
|
|
|
B<SSL> object. After the B<SSL> object has been created using
|
2015-08-17 15:21:33 -04:00
|
|
|
L<SSL_new(3)>, L<SSL_set_fd(3)> or
|
|
|
|
L<SSL_set_bio(3)> can be used to associate the network
|
2000-10-18 23:08:55 +00:00
|
|
|
connection with the object.
|
2000-01-21 23:58:03 +00:00
|
|
|
|
2017-12-12 13:14:45 +01:00
|
|
|
When the TLS/SSL handshake is performed using
|
2015-08-17 15:21:33 -04:00
|
|
|
L<SSL_accept(3)> or L<SSL_connect(3)>
|
2000-10-18 23:08:55 +00:00
|
|
|
respectively.
|
2016-10-20 15:04:21 +01:00
|
|
|
L<SSL_read_ex(3)>, L<SSL_read(3)>, L<SSL_write_ex(3)> and L<SSL_write(3)> are
|
|
|
|
used to read and write data on the TLS/SSL connection.
|
2015-08-17 15:21:33 -04:00
|
|
|
L<SSL_shutdown(3)> can be used to shut down the
|
2000-10-18 23:08:55 +00:00
|
|
|
TLS/SSL connection.
|
2000-01-21 23:58:03 +00:00
|
|
|
|
|
|
|
=head1 DATA STRUCTURES
|
|
|
|
|
|
|
|
Currently the OpenSSL B<ssl> library functions deals with the following data
|
|
|
|
structures:
|
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item B<SSL_METHOD> (SSL Method)
|
|
|
|
|
2017-12-12 13:14:45 +01:00
|
|
|
This is a dispatch structure describing the internal B<ssl> library
|
2014-11-30 15:35:22 +01:00
|
|
|
methods/functions which implement the various protocol versions (SSLv3
|
|
|
|
TLSv1, ...). It's needed to create an B<SSL_CTX>.
|
2000-01-21 23:58:03 +00:00
|
|
|
|
|
|
|
=item B<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
|
2017-12-12 13:14:45 +01:00
|
|
|
on a B<SSL_CTX> basis and the actual ones used are then part of the
|
2000-01-21 23:58:03 +00:00
|
|
|
B<SSL_SESSION>.
|
|
|
|
|
|
|
|
=item B<SSL_CTX> (SSL Context)
|
|
|
|
|
2017-12-12 13:14:45 +01:00
|
|
|
This is the global context structure which is created by a server or client
|
2000-01-21 23:58:03 +00:00
|
|
|
once per program life-time and which holds mainly default values for the
|
|
|
|
B<SSL> structures which are later created for the connections.
|
|
|
|
|
|
|
|
=item B<SSL_SESSION> (SSL Session)
|
|
|
|
|
2000-09-16 16:05:34 +00:00
|
|
|
This is a structure containing the current TLS/SSL session details for a
|
2000-01-21 23:58:03 +00:00
|
|
|
connection: B<SSL_CIPHER>s, client and server certificates, keys, etc.
|
|
|
|
|
|
|
|
=item B<SSL> (SSL Connection)
|
|
|
|
|
2017-12-12 13:14:45 +01:00
|
|
|
This is the main SSL/TLS structure which is created by a server or client per
|
2000-01-21 23:58:03 +00:00
|
|
|
established connection. This actually is the core structure in the SSL API.
|
2017-12-12 13:14:45 +01:00
|
|
|
At run-time the application usually deals with this structure which has
|
2000-01-21 23:58:03 +00:00
|
|
|
links to mostly all other structures.
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
2000-10-18 23:08:55 +00:00
|
|
|
|
|
|
|
=head1 HEADER FILES
|
|
|
|
|
|
|
|
Currently the OpenSSL B<ssl> library provides the following C header files
|
2016-03-20 11:51:06 -04:00
|
|
|
containing the prototypes for the data structures and functions:
|
2000-10-18 23:08:55 +00:00
|
|
|
|
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item B<ssl.h>
|
|
|
|
|
2017-12-12 13:14:45 +01:00
|
|
|
This is the common header file for the SSL/TLS API. Include it into your
|
2000-10-18 23:08:55 +00:00
|
|
|
program to make the API of the B<ssl> library available. It internally
|
|
|
|
includes both more private SSL headers and headers from the B<crypto> library.
|
|
|
|
Whenever you need hard-core details on the internals of the SSL API, look
|
|
|
|
inside this header file.
|
|
|
|
|
|
|
|
=item B<ssl2.h>
|
|
|
|
|
2015-10-29 14:50:40 +00:00
|
|
|
Unused. Present for backwards compatibility only.
|
2000-10-18 23:08:55 +00:00
|
|
|
|
|
|
|
=item B<ssl3.h>
|
|
|
|
|
2017-12-12 13:14:45 +01:00
|
|
|
This is the sub header file dealing with the SSLv3 protocol only.
|
2000-10-18 23:08:55 +00:00
|
|
|
I<Usually you don't have to include it explicitly because
|
|
|
|
it's already included by ssl.h>.
|
|
|
|
|
|
|
|
=item B<tls1.h>
|
|
|
|
|
2017-12-12 13:14:45 +01:00
|
|
|
This is the sub header file dealing with the TLSv1 protocol only.
|
2000-10-18 23:08:55 +00:00
|
|
|
I<Usually you don't have to include it explicitly because
|
|
|
|
it's already included by ssl.h>.
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
2000-01-21 23:58:03 +00:00
|
|
|
=head1 SEE ALSO
|
|
|
|
|
2016-11-11 09:33:55 +01:00
|
|
|
L<openssl(1)>, L<crypto(7)>,
|
2016-01-07 15:06:38 -05:00
|
|
|
L<CRYPTO_get_ex_new_index(3)>,
|
2015-08-17 15:21:33 -04:00
|
|
|
L<SSL_accept(3)>, L<SSL_clear(3)>,
|
|
|
|
L<SSL_connect(3)>,
|
|
|
|
L<SSL_CIPHER_get_name(3)>,
|
|
|
|
L<SSL_COMP_add_compression_method(3)>,
|
|
|
|
L<SSL_CTX_add_extra_chain_cert(3)>,
|
|
|
|
L<SSL_CTX_add_session(3)>,
|
|
|
|
L<SSL_CTX_ctrl(3)>,
|
|
|
|
L<SSL_CTX_flush_sessions(3)>,
|
|
|
|
L<SSL_CTX_get_verify_mode(3)>,
|
|
|
|
L<SSL_CTX_load_verify_locations(3)>
|
|
|
|
L<SSL_CTX_new(3)>,
|
|
|
|
L<SSL_CTX_sess_number(3)>,
|
|
|
|
L<SSL_CTX_sess_set_cache_size(3)>,
|
|
|
|
L<SSL_CTX_sess_set_get_cb(3)>,
|
|
|
|
L<SSL_CTX_sessions(3)>,
|
|
|
|
L<SSL_CTX_set_cert_store(3)>,
|
|
|
|
L<SSL_CTX_set_cert_verify_callback(3)>,
|
|
|
|
L<SSL_CTX_set_cipher_list(3)>,
|
|
|
|
L<SSL_CTX_set_client_CA_list(3)>,
|
|
|
|
L<SSL_CTX_set_client_cert_cb(3)>,
|
|
|
|
L<SSL_CTX_set_default_passwd_cb(3)>,
|
|
|
|
L<SSL_CTX_set_generate_session_id(3)>,
|
|
|
|
L<SSL_CTX_set_info_callback(3)>,
|
|
|
|
L<SSL_CTX_set_max_cert_list(3)>,
|
|
|
|
L<SSL_CTX_set_mode(3)>,
|
|
|
|
L<SSL_CTX_set_msg_callback(3)>,
|
|
|
|
L<SSL_CTX_set_options(3)>,
|
|
|
|
L<SSL_CTX_set_quiet_shutdown(3)>,
|
|
|
|
L<SSL_CTX_set_read_ahead(3)>,
|
2016-11-11 00:51:04 +01:00
|
|
|
L<SSL_CTX_set_security_level(3)>,
|
2015-08-17 15:21:33 -04:00
|
|
|
L<SSL_CTX_set_session_cache_mode(3)>,
|
|
|
|
L<SSL_CTX_set_session_id_context(3)>,
|
2018-10-25 15:43:35 -07:00
|
|
|
L<SSL_CTX_set_srp_password(3)>,
|
2015-08-17 15:21:33 -04:00
|
|
|
L<SSL_CTX_set_ssl_version(3)>,
|
|
|
|
L<SSL_CTX_set_timeout(3)>,
|
|
|
|
L<SSL_CTX_set_tmp_dh_callback(3)>,
|
2018-10-16 16:40:01 -07:00
|
|
|
L<SSL_CTX_set_tmp_ecdh(3)>,
|
2015-08-17 15:21:33 -04:00
|
|
|
L<SSL_CTX_set_verify(3)>,
|
|
|
|
L<SSL_CTX_use_certificate(3)>,
|
|
|
|
L<SSL_alert_type_string(3)>,
|
|
|
|
L<SSL_do_handshake(3)>,
|
2016-04-28 07:37:24 +01:00
|
|
|
L<SSL_enable_ct(3)>,
|
2015-08-17 15:21:33 -04:00
|
|
|
L<SSL_get_SSL_CTX(3)>,
|
|
|
|
L<SSL_get_ciphers(3)>,
|
|
|
|
L<SSL_get_client_CA_list(3)>,
|
|
|
|
L<SSL_get_default_timeout(3)>,
|
|
|
|
L<SSL_get_error(3)>,
|
|
|
|
L<SSL_get_ex_data_X509_STORE_CTX_idx(3)>,
|
|
|
|
L<SSL_get_fd(3)>,
|
|
|
|
L<SSL_get_peer_cert_chain(3)>,
|
|
|
|
L<SSL_get_rbio(3)>,
|
|
|
|
L<SSL_get_session(3)>,
|
|
|
|
L<SSL_get_verify_result(3)>,
|
|
|
|
L<SSL_get_version(3)>,
|
|
|
|
L<SSL_load_client_CA_file(3)>,
|
|
|
|
L<SSL_new(3)>,
|
|
|
|
L<SSL_pending(3)>,
|
2016-10-20 15:04:21 +01:00
|
|
|
L<SSL_read_ex(3)>,
|
2015-08-17 15:21:33 -04:00
|
|
|
L<SSL_read(3)>,
|
|
|
|
L<SSL_rstate_string(3)>,
|
|
|
|
L<SSL_session_reused(3)>,
|
|
|
|
L<SSL_set_bio(3)>,
|
|
|
|
L<SSL_set_connect_state(3)>,
|
|
|
|
L<SSL_set_fd(3)>,
|
|
|
|
L<SSL_set_session(3)>,
|
|
|
|
L<SSL_set_shutdown(3)>,
|
|
|
|
L<SSL_shutdown(3)>,
|
|
|
|
L<SSL_state_string(3)>,
|
|
|
|
L<SSL_want(3)>,
|
2016-10-20 15:04:21 +01:00
|
|
|
L<SSL_write_ex(3)>,
|
2015-08-17 15:21:33 -04:00
|
|
|
L<SSL_write(3)>,
|
|
|
|
L<SSL_SESSION_free(3)>,
|
|
|
|
L<SSL_SESSION_get_time(3)>,
|
|
|
|
L<d2i_SSL_SESSION(3)>,
|
|
|
|
L<SSL_CTX_set_psk_client_callback(3)>,
|
|
|
|
L<SSL_CTX_use_psk_identity_hint(3)>,
|
2015-04-10 14:05:19 +01:00
|
|
|
L<SSL_get_psk_identity(3)>,
|
2015-12-18 13:18:31 -05:00
|
|
|
L<DTLSv1_listen(3)>
|
2000-01-21 23:58:03 +00:00
|
|
|
|
2016-05-18 11:44:05 -04:00
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
2018-02-13 12:51:29 +00:00
|
|
|
Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
|
2016-05-18 11:44:05 -04:00
|
|
|
|
2018-12-06 14:05:22 +01:00
|
|
|
Licensed under the Apache License 2.0 (the "License"). You may not use
|
2016-05-18 11:44:05 -04:00
|
|
|
this file except in compliance with the License. You can obtain a copy
|
|
|
|
in the file LICENSE in the source distribution or at
|
|
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
|
|
|
|
=cut
|