summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2016-11-30 15:48:53 +0000
committerschwarze <>2016-11-30 15:48:53 +0000
commitb1fc43635eea9d87b5527d20617c711079fb4119 (patch)
tree3e7a0a402fa8be1911ce5be6ff0fcb93bb367ef8
parent194dbb0467a1ca55270aab260f9669d6c2c17d2e (diff)
downloadopenbsd-b1fc43635eea9d87b5527d20617c711079fb4119.tar.gz
openbsd-b1fc43635eea9d87b5527d20617c711079fb4119.tar.bz2
openbsd-b1fc43635eea9d87b5527d20617c711079fb4119.zip
Add Copyright and license.
Remove the last traces of SSLv3. Add TLS_method(3), TLSv1_2_method(3), DTLSv1_method(3) and friends. Add missing prototypes to the SYNOPSIS. Merge additional information from OpenSSL. Simplify description of TLSv1_method(3) and SSLv23_method(3), from OpenSSL. Some additional minor fixes.
-rw-r--r--src/lib/libssl/man/SSL_CTX_new.3218
1 files changed, 164 insertions, 54 deletions
diff --git a/src/lib/libssl/man/SSL_CTX_new.3 b/src/lib/libssl/man/SSL_CTX_new.3
index 872d302b24..ee60f2a9f8 100644
--- a/src/lib/libssl/man/SSL_CTX_new.3
+++ b/src/lib/libssl/man/SSL_CTX_new.3
@@ -1,34 +1,127 @@
1.\" $OpenBSD: SSL_CTX_new.3,v 1.2 2016/11/30 15:48:53 schwarze Exp $
2.\" OpenSSL 21cd6e00 Aug 17 15:21:33 2015 -0400
1.\" 3.\"
2.\" $OpenBSD: SSL_CTX_new.3,v 1.1 2016/11/05 15:32:19 schwarze Exp $ 4.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
5.\" Copyright (c) 2000, 2005, 2012, 2013, 2015, 2016 The OpenSSL Project.
6.\" All rights reserved.
3.\" 7.\"
4.Dd $Mdocdate: November 5 2016 $ 8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\"
12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer.
14.\"
15.\" 2. Redistributions in binary form must reproduce the above copyright
16.\" notice, this list of conditions and the following disclaimer in
17.\" the documentation and/or other materials provided with the
18.\" distribution.
19.\"
20.\" 3. All advertising materials mentioning features or use of this
21.\" software must display the following acknowledgment:
22.\" "This product includes software developed by the OpenSSL Project
23.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24.\"
25.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26.\" endorse or promote products derived from this software without
27.\" prior written permission. For written permission, please contact
28.\" openssl-core@openssl.org.
29.\"
30.\" 5. Products derived from this software may not be called "OpenSSL"
31.\" nor may "OpenSSL" appear in their names without prior written
32.\" permission of the OpenSSL Project.
33.\"
34.\" 6. Redistributions of any form whatsoever must retain the following
35.\" acknowledgment:
36.\" "This product includes software developed by the OpenSSL Project
37.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
38.\"
39.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
40.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
41.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
42.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
43.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
45.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
46.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
48.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\"
52.Dd $Mdocdate: November 30 2016 $
5.Dt SSL_CTX_NEW 3 53.Dt SSL_CTX_NEW 3
6.Os 54.Os
7.Sh NAME 55.Sh NAME
8.Nm SSL_CTX_new , 56.Nm SSL_CTX_new ,
9.Nm SSLv3_method , 57.Nm TLS_method ,
10.Nm SSLv3_server_method , 58.Nm TLS_server_method ,
11.Nm SSLv3_client_method , 59.Nm TLS_client_method ,
60.Nm SSLv23_method ,
61.Nm SSLv23_server_method ,
62.Nm SSLv23_client_method ,
12.Nm TLSv1_method , 63.Nm TLSv1_method ,
13.Nm TLSv1_server_method , 64.Nm TLSv1_server_method ,
14.Nm TLSv1_client_method , 65.Nm TLSv1_client_method ,
15.Nm TLSv1_1_method , 66.Nm TLSv1_1_method ,
16.Nm TLSv1_1_server_method , 67.Nm TLSv1_1_server_method ,
17.Nm TLSv1_1_client_method , 68.Nm TLSv1_1_client_method ,
18.Nm SSLv23_method , 69.Nm TLSv1_2_method ,
19.Nm SSLv23_server_method , 70.Nm TLSv1_2_server_method ,
20.Nm SSLv23_client_method 71.Nm TLSv1_2_client_method ,
72.Nm DTLSv1_method ,
73.Nm DTLSv1_server_method ,
74.Nm DTLSv1_client_method
21.Nd create a new SSL_CTX object as framework for TLS/SSL enabled functions 75.Nd create a new SSL_CTX object as framework for TLS/SSL enabled functions
22.Sh SYNOPSIS 76.Sh SYNOPSIS
23.In openssl/ssl.h 77.In openssl/ssl.h
24.Ft SSL_CTX * 78.Ft SSL_CTX *
25.Fn SSL_CTX_new "const SSL_METHOD *method" 79.Fn SSL_CTX_new "const SSL_METHOD *method"
80.Ft const SSL_METHOD *
81.Fn TLS_method void
82.Ft const SSL_METHOD *
83.Fn TLS_server_method void
84.Ft const SSL_METHOD *
85.Fn TLS_client_method void
86.Ft const SSL_METHOD *
87.Fn SSLv23_method void
88.Ft const SSL_METHOD *
89.Fn SSLv23_server_method void
90.Ft const SSL_METHOD *
91.Fn SSLv23_client_method void
92.Ft const SSL_METHOD *
93.Fn TLSv1_method void
94.Ft const SSL_METHOD *
95.Fn TLSv1_server_method void
96.Ft const SSL_METHOD *
97.Fn TLSv1_client_method void
98.Ft const SSL_METHOD *
99.Fn TLSv1_1_method void
100.Ft const SSL_METHOD *
101.Fn TLSv1_1_server_method void
102.Ft const SSL_METHOD *
103.Fn TLSv1_1_client_method void
104.Ft const SSL_METHOD *
105.Fn TLSv1_2_method void
106.Ft const SSL_METHOD *
107.Fn TLSv1_2_server_method void
108.Ft const SSL_METHOD *
109.Fn TLSv1_2_client_method void
110.Ft const SSL_METHOD *
111.Fn DTLSv1_method void
112.Ft const SSL_METHOD *
113.Fn DTLSv1_server_method void
114.Ft const SSL_METHOD *
115.Fn DTLSv1_client_method void
26.Sh DESCRIPTION 116.Sh DESCRIPTION
27.Fn SSL_CTX_new 117.Fn SSL_CTX_new
28creates a new 118creates a new
29.Vt SSL_CTX 119.Vt SSL_CTX
30object as framework to establish TLS/SSL enabled connections. 120object as framework to establish TLS/SSL or DTLS enabled connections.
31.Sh NOTES 121It initializes the list of ciphers, the session cache setting, the
122callbacks, the keys and certificates, and the options to its default
123values.
124.Pp
32The 125The
33.Vt SSL_CTX 126.Vt SSL_CTX
34object uses 127object uses
@@ -39,58 +132,75 @@ a server only type, and a client only type.
39.Fa method 132.Fa method
40can be of the following types: 133can be of the following types:
41.Bl -tag -width Ds 134.Bl -tag -width Ds
42.It Fn SSLv3_method void , Fn SSLv3_server_method void , \ 135.It Xo
43Fn SSLv3_client_method void 136.Fn TLS_method ,
44A TLS/SSL connection established with these methods will only understand the 137.Fn TLS_server_method ,
45SSLv3 protocol. 138.Fn TLS_client_method
46A client will send out SSLv3 client hello messages and will indicate that it 139.Xc
47only understands SSLv3. 140These are the general-purpose version-flexible SSL/TLS methods.
48A server will only understand SSLv3 client hello messages. 141The actual protocol version used will be negotiated to the highest
49Importantly, this means that it will not understand SSLv2 client hello messages 142version mutually supported by the client and the server.
50which are widely used for compatibility reasons; see 143The supported protocols are TLSv1, TLSv1.1 and TLSv1.2.
51.Fn SSLv23_*_method . 144Applications should use these methods and avoid the version-specific
52.It Fn TLSv1_method void , Fn TLSv1_server_method void , \ 145methods described below.
53Fn TLSv1_client_method void 146.It Xo
54A TLS/SSL connection established with these methods will only understand the 147.Fn SSLv23_method ,
55TLSv1 protocol. 148.Fn SSLv23_server_method ,
56A client will send out TLSv1 client hello messages and will indicate that it 149.Fn SSLv23_client_method
57only understands TLSv1. 150.Xc
58A server will only understand TLSv1 client hello messages. 151Use of these functions is deprecated.
59Importantly, this means that it will not understand SSLv2 client hello messages 152They have been replaced with the above
60which are widely used for compatibility reasons; see 153.Fn TLS_method ,
61.Fn SSLv23_*_method . 154.Fn TLS_server_method ,
62It will also not understand SSLv3 client hello messages. 155and
63.It Fn SSLv23_method void , Fn SSLv23_server_method void , \ 156.Fn TLS_client_method ,
64Fn SSLv23_client_method void 157respectively.
65A TLS/SSL connection established with these methods may understand the SSLv3, 158New code should use those functions instead.
66TLSv1, TLSv1.1 and TLSv1.2 protocols. 159.It Xo
67.Pp 160.Fn TLSv1_method ,
68A client will send out TLSv1 client hello messages including extensions and 161.Fn TLSv1_server_method ,
69will indicate that it also understands TLSv1.1, TLSv1.2 and permits a fallback 162.Fn TLSv1_client_method
70to SSLv3. 163.Xc
71A server will support SSLv3, TLSv1, TLSv1.1 and TLSv1.2 protocols. 164A TLS/SSL connection established with these methods will only
72This is the best choice when compatibility is a concern. 165understand the TLSv1 protocol.
166.It Xo
167.Fn TLSv1_1_method ,
168.Fn TLSv1_1_server_method ,
169.Fn TLSv1_1_client_method
170.Xc
171A TLS/SSL connection established with these methods will only
172understand the TLSv1.1 protocol.
173.It Xo
174.Fn TLSv1_2_method ,
175.Fn TLSv1_2_server_method ,
176.Fn TLSv1_2_client_method
177.Xc
178A TLS/SSL connection established with these methods will only
179understand the TLSv1.2 protocol.
180.It Xo
181.Fn DTLSv1_method ,
182.Fn DTLSv1_server_method ,
183.Fn DTLSv1_client_method
184.Xc
185These are the version-specific methods for DTLSv1.
73.El 186.El
74.Pp 187.Pp
75The list of protocols available can later be limited using the 188The list of protocols available can also be limited using the
76.Dv SSL_OP_NO_SSLv3 ,
77.Dv SSL_OP_NO_TLSv1 , 189.Dv SSL_OP_NO_TLSv1 ,
78.Dv SSL_OP_NO_TLSv1_1 , 190.Dv SSL_OP_NO_TLSv1_1 ,
79and 191and
80.Dv SSL_OP_NO_TLSv1_2 192.Dv SSL_OP_NO_TLSv1_2
81options of the 193options of the
82.Fn SSL_CTX_set_options 194.Xr SSL_CTX_set_options 3
83or 195or
84.Fn SSL_set_options 196.Xr SSL_set_options 3
85functions. 197functions, but this approach is not recommended.
86Using these options it is possible to choose, for example, 198Clients should avoid creating "holes" in the set of protocols they support.
87.Fn SSLv23_server_method 199When disabling a protocol, make sure that you also disable either
88and be able to negotiate with all possible clients, 200all previous or all subsequent protocol versions.
89but to only allow newer protocols like TLSv1, TLSv1.1 or TLS v1.2. 201In clients, when a protocol version is disabled without disabling
90.Pp 202all previous protocol versions, the effect is to also disable all
91.Fn SSL_CTX_new 203subsequent protocol versions.
92initializes the list of ciphers, the session cache setting, the callbacks,
93the keys and certificates, and the options to its default values.
94.Sh RETURN VALUES 204.Sh RETURN VALUES
95The following return values can occur: 205The following return values can occur:
96.Bl -tag -width Ds 206.Bl -tag -width Ds