1SSL_CTX_new(3)                      OpenSSL                     SSL_CTX_new(3)
2
3
4

NAME

6       SSL_CTX_new, SSLv23_method, SSLv23_server_method, SSLv23_client_method,
7       TLSv1_2_method, TLSv1_2_server_method, TLSv1_2_client_method,
8       TLSv1_1_method, TLSv1_1_server_method, TLSv1_1_client_method,
9       TLSv1_method, TLSv1_server_method, TLSv1_client_method, SSLv3_method,
10       SSLv3_server_method, SSLv3_client_method, SSLv2_method,
11       SSLv2_server_method, SSLv2_client_method, DTLS_method,
12       DTLS_server_method, DTLS_client_method, DTLSv1_2_method,
13       DTLSv1_2_server_method, DTLSv1_2_client_method, DTLSv1_method,
14       DTLSv1_server_method, DTLSv1_client_method - create a new SSL_CTX
15       object as framework for TLS/SSL enabled functions
16

SYNOPSIS

18        #include <openssl/ssl.h>
19
20        SSL_CTX *SSL_CTX_new(const SSL_METHOD *method);
21        const SSL_METHOD *SSLv23_method(void);
22        const SSL_METHOD *SSLv23_server_method(void);
23        const SSL_METHOD *SSLv23_client_method(void);
24        const SSL_METHOD *TLSv1_2_method(void);
25        const SSL_METHOD *TLSv1_2_server_method(void);
26        const SSL_METHOD *TLSv1_2_client_method(void);
27        const SSL_METHOD *TLSv1_1_method(void);
28        const SSL_METHOD *TLSv1_1_server_method(void);
29        const SSL_METHOD *TLSv1_1_client_method(void);
30        const SSL_METHOD *TLSv1_method(void);
31        const SSL_METHOD *TLSv1_server_method(void);
32        const SSL_METHOD *TLSv1_client_method(void);
33        #ifndef OPENSSL_NO_SSL3_METHOD
34        const SSL_METHOD *SSLv3_method(void);
35        const SSL_METHOD *SSLv3_server_method(void);
36        const SSL_METHOD *SSLv3_client_method(void);
37        #endif
38        #ifndef OPENSSL_NO_SSL2
39        const SSL_METHOD *SSLv2_method(void);
40        const SSL_METHOD *SSLv2_server_method(void);
41        const SSL_METHOD *SSLv2_client_method(void);
42        #endif
43
44        const SSL_METHOD *DTLS_method(void);
45        const SSL_METHOD *DTLS_server_method(void);
46        const SSL_METHOD *DTLS_client_method(void);
47        const SSL_METHOD *DTLSv1_2_method(void);
48        const SSL_METHOD *DTLSv1_2_server_method(void);
49        const SSL_METHOD *DTLSv1_2_client_method(void);
50        const SSL_METHOD *DTLSv1_method(void);
51        const SSL_METHOD *DTLSv1_server_method(void);
52        const SSL_METHOD *DTLSv1_client_method(void);
53

DESCRIPTION

55       SSL_CTX_new() creates a new SSL_CTX object as framework to establish
56       TLS/SSL enabled connections.
57

NOTES

59       The SSL_CTX object uses method as connection method. The methods exist
60       in a generic type (for client and server use), a server only type, and
61       a client only type. method can be of the following types:
62
63       SSLv23_method(), SSLv23_server_method(), SSLv23_client_method()
64           These are the general-purpose version-flexible SSL/TLS methods.
65           The actual protocol version used will be negotiated to the highest
66           version mutually supported by the client and the server.  The
67           supported protocols are SSLv2, SSLv3, TLSv1, TLSv1.1 and TLSv1.2.
68           Most applications should use these method, and avoid the version
69           specific methods described below.
70
71           The list of protocols available can be further limited using the
72           SSL_OP_NO_SSLv2, SSL_OP_NO_SSLv3, SSL_OP_NO_TLSv1,
73           SSL_OP_NO_TLSv1_1 and SSL_OP_NO_TLSv1_2 options of the
74           SSL_CTX_set_options(3) or SSL_set_options(3) functions.  Clients
75           should avoid creating "holes" in the set of protocols they support,
76           when disabling a protocol, make sure that you also disable either
77           all previous or all subsequent protocol versions.  In clients, when
78           a protocol version is disabled without disabling all previous
79           protocol versions, the effect is to also disable all subsequent
80           protocol versions.
81
82           The SSLv2 and SSLv3 protocols are deprecated and should generally
83           not be used.  Applications should typically use
84           SSL_CTX_set_options(3) in combination with the SSL_OP_NO_SSLv3 flag
85           to disable negotiation of SSLv3 via the above version-flexible
86           SSL/TLS methods.  The SSL_OP_NO_SSLv2 option is set by default, and
87           would need to be cleared via SSL_CTX_clear_options(3) in order to
88           enable negotiation of SSLv2.
89
90       TLSv1_2_method(), TLSv1_2_server_method(), TLSv1_2_client_method()
91           A TLS/SSL connection established with these methods will only
92           understand the TLSv1.2 protocol.  A client will send out TLSv1.2
93           client hello messages and will also indicate that it only
94           understand TLSv1.2.  A server will only understand TLSv1.2 client
95           hello messages.
96
97       TLSv1_1_method(), TLSv1_1_server_method(), TLSv1_1_client_method()
98           A TLS/SSL connection established with these methods will only
99           understand the TLSv1.1 protocol.  A client will send out TLSv1.1
100           client hello messages and will also indicate that it only
101           understand TLSv1.1.  A server will only understand TLSv1.1 client
102           hello messages.
103
104       TLSv1_method(), TLSv1_server_method(), TLSv1_client_method()
105           A TLS/SSL connection established with these methods will only
106           understand the TLSv1 protocol.  A client will send out TLSv1 client
107           hello messages and will indicate that it only understands TLSv1.  A
108           server will only understand TLSv1 client hello messages.
109
110       SSLv3_method(), SSLv3_server_method(), SSLv3_client_method()
111           A TLS/SSL connection established with these methods will only
112           understand the SSLv3 protocol.  A client will send out SSLv3 client
113           hello messages and will indicate that it only understands SSLv3.  A
114           server will only understand SSLv3 client hello messages.  The SSLv3
115           protocol is deprecated and should not be used.
116
117       SSLv2_method(), SSLv2_server_method(), SSLv2_client_method()
118           These calls are provided only as stubs for keeping ABI
119           compatibility. There is no support for SSLv2 built in the library.
120
121       DTLS_method(), DTLS_server_method(), DTLS_client_method()
122           These are the version-flexible DTLS methods.
123
124       DTLSv1_2_method(), DTLSv1_2_server_method(), DTLSv1_2_client_method()
125           These are the version-specific methods for DTLSv1.2.
126
127       DTLSv1_method(), DTLSv1_server_method(), DTLSv1_client_method()
128           These are the version-specific methods for DTLSv1.
129
130       SSL_CTX_new() initializes the list of ciphers, the session cache
131       setting, the callbacks, the keys and certificates and the options to
132       its default values.
133

RETURN VALUES

135       The following return values can occur:
136
137       NULL
138           The creation of a new SSL_CTX object failed. Check the error stack
139           to find out the reason.
140
141       Pointer to an SSL_CTX object
142           The return value points to an allocated SSL_CTX object.
143

SEE ALSO

145       SSL_CTX_set_options(3), SSL_CTX_clear_options(3), SSL_set_options(3),
146       SSL_CTX_free(3), SSL_accept(3), ssl(3),  SSL_set_connect_state(3)
147
148
149
1501.0.2k                            2019-03-12                    SSL_CTX_new(3)
Impressum