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