summaryrefslogtreecommitdiff
path: root/src/lib/libssl/doc/SSL_CTX_new.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/doc/SSL_CTX_new.3')
-rw-r--r--src/lib/libssl/doc/SSL_CTX_new.3108
1 files changed, 108 insertions, 0 deletions
diff --git a/src/lib/libssl/doc/SSL_CTX_new.3 b/src/lib/libssl/doc/SSL_CTX_new.3
new file mode 100644
index 0000000000..b798d10a9e
--- /dev/null
+++ b/src/lib/libssl/doc/SSL_CTX_new.3
@@ -0,0 +1,108 @@
1.Dd $Mdocdate: October 12 2014 $
2.Dt SSL_CTX_NEW 3
3.Os
4.Sh NAME
5.Nm SSL_CTX_new ,
6.Nm SSLv3_method ,
7.Nm SSLv3_server_method ,
8.Nm SSLv3_client_method ,
9.Nm TLSv1_method ,
10.Nm TLSv1_server_method ,
11.Nm TLSv1_client_method ,
12.Nm TLSv1_1_method ,
13.Nm TLSv1_1_server_method ,
14.Nm TLSv1_1_client_method ,
15.Nm SSLv23_method ,
16.Nm SSLv23_server_method ,
17.Nm SSLv23_client_method
18.Nd create a new SSL_CTX object as framework for TLS/SSL enabled functions
19.Sh SYNOPSIS
20.In openssl/ssl.h
21.Ft SSL_CTX *
22.Fn SSL_CTX_new "const SSL_METHOD *method"
23.Sh DESCRIPTION
24.Fn SSL_CTX_new
25creates a new
26.Vt SSL_CTX
27object as framework to establish TLS/SSL enabled connections.
28.Sh NOTES
29The
30.Vt SSL_CTX
31object uses
32.Fa method
33as its connection method.
34The methods exist in a generic type (for client and server use),
35a server only type, and a client only type.
36.Fa method
37can be of the following types:
38.Bl -tag -width Ds
39.It Fn SSLv3_method void , Fn SSLv3_server_method void , \
40Fn SSLv3_client_method void
41A TLS/SSL connection established with these methods will only understand the
42SSLv3 protocol.
43A client will send out SSLv3 client hello messages and will indicate that it
44only understands SSLv3.
45A server will only understand SSLv3 client hello messages.
46Importantly, this means that it will not understand SSLv2 client hello messages
47which are widely used for compatibility reasons; see
48.Fn SSLv23_*_method .
49.It Fn TLSv1_method void , Fn TLSv1_server_method void , \
50Fn TLSv1_client_method void
51A TLS/SSL connection established with these methods will only understand the
52TLSv1 protocol.
53A client will send out TLSv1 client hello messages and will indicate that it
54only understands TLSv1.
55A server will only understand TLSv1 client hello messages.
56Importantly, this means that it will not understand SSLv2 client hello messages
57which are widely used for compatibility reasons; see
58.Fn SSLv23_*_method .
59It will also not understand SSLv3 client hello messages.
60.It Fn SSLv23_method void , Fn SSLv23_server_method void , \
61Fn SSLv23_client_method void
62A TLS/SSL connection established with these methods may understand the SSLv3,
63TLSv1, TLSv1.1 and TLSv1.2 protocols.
64.Pp
65A client will send out TLSv1 client hello messages including extensions and
66will indicate that it also understands TLSv1.1, TLSv1.2 and permits a fallback
67to SSLv3.
68A server will support SSLv3, TLSv1, TLSv1.1 and TLSv1.2 protocols.
69This is the best choice when compatibility is a concern.
70.El
71.Pp
72The list of protocols available can later be limited using the
73.Dv SSL_OP_NO_SSLv3 ,
74.Dv SSL_OP_NO_TLSv1 ,
75.Dv SSL_OP_NO_TLSv1_1 ,
76and
77.Dv SSL_OP_NO_TLSv1_2
78options of the
79.Fn SSL_CTX_set_options
80or
81.Fn SSL_set_options
82functions.
83Using these options it is possible to choose, for example,
84.Fn SSLv23_server_method
85and be able to negotiate with all possible clients,
86but to only allow newer protocols like TLSv1, TLSv1.1 or TLS v1.2.
87.Pp
88.Fn SSL_CTX_new
89initializes the list of ciphers, the session cache setting, the callbacks,
90the keys and certificates, and the options to its default values.
91.Sh RETURN VALUES
92The following return values can occur:
93.Bl -tag -width Ds
94.It Dv NULL
95The creation of a new
96.Vt SSL_CTX
97object failed.
98Check the error stack to find out the reason.
99.It Pointer to an SSL_CTX object
100The return value points to an allocated
101.Vt SSL_CTX
102object.
103.El
104.Sh SEE ALSO
105.Xr ssl 3 ,
106.Xr SSL_accept 3 ,
107.Xr SSL_CTX_free 3 ,
108.Xr SSL_set_connect_state 3