1e1051a39Sopenharmony_ci=pod 2e1051a39Sopenharmony_ci 3e1051a39Sopenharmony_ci=head1 NAME 4e1051a39Sopenharmony_ci 5e1051a39Sopenharmony_cissl - OpenSSL SSL/TLS library 6e1051a39Sopenharmony_ci 7e1051a39Sopenharmony_ci=head1 SYNOPSIS 8e1051a39Sopenharmony_ci 9e1051a39Sopenharmony_ciSee the individual manual pages for details. 10e1051a39Sopenharmony_ci 11e1051a39Sopenharmony_ci=head1 DESCRIPTION 12e1051a39Sopenharmony_ci 13e1051a39Sopenharmony_ciThe OpenSSL B<ssl> library implements several versions of the 14e1051a39Sopenharmony_ciSecure Sockets Layer, Transport Layer Security, and Datagram Transport Layer 15e1051a39Sopenharmony_ciSecurity protocols. 16e1051a39Sopenharmony_ciThis page gives a brief overview of the extensive API and data types 17e1051a39Sopenharmony_ciprovided by the library. 18e1051a39Sopenharmony_ci 19e1051a39Sopenharmony_ciAn B<SSL_CTX> object is created as a framework to establish 20e1051a39Sopenharmony_ciTLS/SSL enabled connections (see L<SSL_CTX_new(3)>). 21e1051a39Sopenharmony_ciVarious options regarding certificates, algorithms etc. can be set 22e1051a39Sopenharmony_ciin this object. 23e1051a39Sopenharmony_ci 24e1051a39Sopenharmony_ciWhen a network connection has been created, it can be assigned to an 25e1051a39Sopenharmony_ciB<SSL> object. After the B<SSL> object has been created using 26e1051a39Sopenharmony_ciL<SSL_new(3)>, L<SSL_set_fd(3)> or 27e1051a39Sopenharmony_ciL<SSL_set_bio(3)> can be used to associate the network 28e1051a39Sopenharmony_ciconnection with the object. 29e1051a39Sopenharmony_ci 30e1051a39Sopenharmony_ciWhen the TLS/SSL handshake is performed using 31e1051a39Sopenharmony_ciL<SSL_accept(3)> or L<SSL_connect(3)> 32e1051a39Sopenharmony_cirespectively. 33e1051a39Sopenharmony_ciL<SSL_read_ex(3)>, L<SSL_read(3)>, L<SSL_write_ex(3)> and L<SSL_write(3)> are 34e1051a39Sopenharmony_ciused to read and write data on the TLS/SSL connection. 35e1051a39Sopenharmony_ciL<SSL_shutdown(3)> can be used to shut down the 36e1051a39Sopenharmony_ciTLS/SSL connection. 37e1051a39Sopenharmony_ci 38e1051a39Sopenharmony_ci=head1 DATA STRUCTURES 39e1051a39Sopenharmony_ci 40e1051a39Sopenharmony_ciHere are some of the main data structures in the library. 41e1051a39Sopenharmony_ci 42e1051a39Sopenharmony_ci=over 4 43e1051a39Sopenharmony_ci 44e1051a39Sopenharmony_ci=item B<SSL_METHOD> (SSL Method) 45e1051a39Sopenharmony_ci 46e1051a39Sopenharmony_ciThis is a dispatch structure describing the internal B<ssl> library 47e1051a39Sopenharmony_cimethods/functions which implement the various protocol versions (SSLv3 48e1051a39Sopenharmony_ciTLSv1, ...). It's needed to create an B<SSL_CTX>. 49e1051a39Sopenharmony_ci 50e1051a39Sopenharmony_ci=item B<SSL_CIPHER> (SSL Cipher) 51e1051a39Sopenharmony_ci 52e1051a39Sopenharmony_ciThis structure holds the algorithm information for a particular cipher which 53e1051a39Sopenharmony_ciare a core part of the SSL/TLS protocol. The available ciphers are configured 54e1051a39Sopenharmony_cion a B<SSL_CTX> basis and the actual ones used are then part of the 55e1051a39Sopenharmony_ciB<SSL_SESSION>. 56e1051a39Sopenharmony_ci 57e1051a39Sopenharmony_ci=item B<SSL_CTX> (SSL Context) 58e1051a39Sopenharmony_ci 59e1051a39Sopenharmony_ciThis is the global context structure which is created by a server or client 60e1051a39Sopenharmony_cionce per program life-time and which holds mainly default values for the 61e1051a39Sopenharmony_ciB<SSL> structures which are later created for the connections. 62e1051a39Sopenharmony_ci 63e1051a39Sopenharmony_ci=item B<SSL_SESSION> (SSL Session) 64e1051a39Sopenharmony_ci 65e1051a39Sopenharmony_ciThis is a structure containing the current TLS/SSL session details for a 66e1051a39Sopenharmony_ciconnection: B<SSL_CIPHER>s, client and server certificates, keys, etc. 67e1051a39Sopenharmony_ci 68e1051a39Sopenharmony_ci=item B<SSL> (SSL Connection) 69e1051a39Sopenharmony_ci 70e1051a39Sopenharmony_ciThis is the main SSL/TLS structure which is created by a server or client per 71e1051a39Sopenharmony_ciestablished connection. This actually is the core structure in the SSL API. 72e1051a39Sopenharmony_ciAt run-time the application usually deals with this structure which has 73e1051a39Sopenharmony_cilinks to mostly all other structures. 74e1051a39Sopenharmony_ci 75e1051a39Sopenharmony_ci=back 76e1051a39Sopenharmony_ci 77e1051a39Sopenharmony_ci=head1 HEADER FILES 78e1051a39Sopenharmony_ci 79e1051a39Sopenharmony_ciCurrently the OpenSSL B<ssl> library provides the following C header files 80e1051a39Sopenharmony_cicontaining the prototypes for the data structures and functions: 81e1051a39Sopenharmony_ci 82e1051a39Sopenharmony_ci=over 4 83e1051a39Sopenharmony_ci 84e1051a39Sopenharmony_ci=item F<< <openssl/ssl.h> >> 85e1051a39Sopenharmony_ci 86e1051a39Sopenharmony_ciThis is the common header file for the SSL/TLS API. Include it into your 87e1051a39Sopenharmony_ciprogram to make the API of the B<ssl> library available. It internally 88e1051a39Sopenharmony_ciincludes both more private SSL headers and headers from the B<crypto> library. 89e1051a39Sopenharmony_ciWhenever you need hard-core details on the internals of the SSL API, look 90e1051a39Sopenharmony_ciinside this header file. 91e1051a39Sopenharmony_ciThis file also includes the others listed below. 92e1051a39Sopenharmony_ci 93e1051a39Sopenharmony_ci=item F<< <openssl/ssl2.h> >> 94e1051a39Sopenharmony_ci 95e1051a39Sopenharmony_ciUnused. Present for backwards compatibility only. 96e1051a39Sopenharmony_ci 97e1051a39Sopenharmony_ci=item F<< <openssl/ssl3.h> >> 98e1051a39Sopenharmony_ci 99e1051a39Sopenharmony_ciThis is the sub header file dealing with the SSLv3 protocol only. 100e1051a39Sopenharmony_ci 101e1051a39Sopenharmony_ci=item F<< <openssl/tls1.h> >> 102e1051a39Sopenharmony_ci 103e1051a39Sopenharmony_ciThis is the sub header file dealing with the TLSv1 protocol only. 104e1051a39Sopenharmony_ci 105e1051a39Sopenharmony_ci=back 106e1051a39Sopenharmony_ci 107e1051a39Sopenharmony_ci=head1 COPYRIGHT 108e1051a39Sopenharmony_ci 109e1051a39Sopenharmony_ciCopyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. 110e1051a39Sopenharmony_ci 111e1051a39Sopenharmony_ciLicensed under the Apache License 2.0 (the "License"). You may not use 112e1051a39Sopenharmony_cithis file except in compliance with the License. You can obtain a copy 113e1051a39Sopenharmony_ciin the file LICENSE in the source distribution or at 114e1051a39Sopenharmony_ciL<https://www.openssl.org/source/license.html>. 115e1051a39Sopenharmony_ci 116e1051a39Sopenharmony_ci=cut 117