2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
11 #include <openssl/macros.h>
12 #include <openssl/objects.h>
13 #include "ssl_local.h"
19 IMPLEMENT_tls_meth_func(TLS_ANY_VERSION
, 0, 0,
22 ossl_statem_connect
, TLSv1_2_enc_data
)
23 IMPLEMENT_tls_meth_func(TLS1_3_VERSION
, 0, SSL_OP_NO_TLSv1_3
,
26 ossl_statem_connect
, TLSv1_3_enc_data
)
27 #ifndef OPENSSL_NO_TLS1_2_METHOD
28 IMPLEMENT_tls_meth_func(TLS1_2_VERSION
, 0, SSL_OP_NO_TLSv1_2
,
31 ossl_statem_connect
, TLSv1_2_enc_data
)
33 #ifndef OPENSSL_NO_TLS1_1_METHOD
34 IMPLEMENT_tls_meth_func(TLS1_1_VERSION
, SSL_METHOD_NO_SUITEB
, SSL_OP_NO_TLSv1_1
,
37 ossl_statem_connect
, TLSv1_1_enc_data
)
39 #ifndef OPENSSL_NO_TLS1_METHOD
40 IMPLEMENT_tls_meth_func(TLS1_VERSION
, SSL_METHOD_NO_SUITEB
, SSL_OP_NO_TLSv1
,
42 ossl_statem_accept
, ossl_statem_connect
, TLSv1_enc_data
)
44 #ifndef OPENSSL_NO_SSL3_METHOD
45 IMPLEMENT_ssl3_meth_func(sslv3_method
, ossl_statem_accept
, ossl_statem_connect
)
48 * TLS/SSLv3 server methods
50 IMPLEMENT_tls_meth_func(TLS_ANY_VERSION
, 0, 0,
53 ssl_undefined_function
, TLSv1_2_enc_data
)
54 IMPLEMENT_tls_meth_func(TLS1_3_VERSION
, 0, SSL_OP_NO_TLSv1_3
,
55 tlsv1_3_server_method
,
57 ssl_undefined_function
, TLSv1_3_enc_data
)
58 #ifndef OPENSSL_NO_TLS1_2_METHOD
59 IMPLEMENT_tls_meth_func(TLS1_2_VERSION
, 0, SSL_OP_NO_TLSv1_2
,
60 tlsv1_2_server_method
,
62 ssl_undefined_function
, TLSv1_2_enc_data
)
64 #ifndef OPENSSL_NO_TLS1_1_METHOD
65 IMPLEMENT_tls_meth_func(TLS1_1_VERSION
, SSL_METHOD_NO_SUITEB
, SSL_OP_NO_TLSv1_1
,
66 tlsv1_1_server_method
,
68 ssl_undefined_function
, TLSv1_1_enc_data
)
70 #ifndef OPENSSL_NO_TLS1_METHOD
71 IMPLEMENT_tls_meth_func(TLS1_VERSION
, SSL_METHOD_NO_SUITEB
, SSL_OP_NO_TLSv1
,
74 ssl_undefined_function
, TLSv1_enc_data
)
76 #ifndef OPENSSL_NO_SSL3_METHOD
77 IMPLEMENT_ssl3_meth_func(sslv3_server_method
,
78 ossl_statem_accept
, ssl_undefined_function
)
81 * TLS/SSLv3 client methods
83 IMPLEMENT_tls_meth_func(TLS_ANY_VERSION
, 0, 0,
85 ssl_undefined_function
,
86 ossl_statem_connect
, TLSv1_2_enc_data
)
87 IMPLEMENT_tls_meth_func(TLS1_3_VERSION
, 0, SSL_OP_NO_TLSv1_3
,
88 tlsv1_3_client_method
,
89 ssl_undefined_function
,
90 ossl_statem_connect
, TLSv1_3_enc_data
)
91 #ifndef OPENSSL_NO_TLS1_2_METHOD
92 IMPLEMENT_tls_meth_func(TLS1_2_VERSION
, 0, SSL_OP_NO_TLSv1_2
,
93 tlsv1_2_client_method
,
94 ssl_undefined_function
,
95 ossl_statem_connect
, TLSv1_2_enc_data
)
97 #ifndef OPENSSL_NO_TLS1_1_METHOD
98 IMPLEMENT_tls_meth_func(TLS1_1_VERSION
, SSL_METHOD_NO_SUITEB
, SSL_OP_NO_TLSv1_1
,
99 tlsv1_1_client_method
,
100 ssl_undefined_function
,
101 ossl_statem_connect
, TLSv1_1_enc_data
)
103 #ifndef OPENSSL_NO_TLS1_METHOD
104 IMPLEMENT_tls_meth_func(TLS1_VERSION
, SSL_METHOD_NO_SUITEB
, SSL_OP_NO_TLSv1
,
106 ssl_undefined_function
,
107 ossl_statem_connect
, TLSv1_enc_data
)
109 #ifndef OPENSSL_NO_SSL3_METHOD
110 IMPLEMENT_ssl3_meth_func(sslv3_client_method
,
111 ssl_undefined_function
, ossl_statem_connect
)
116 #ifndef OPENSSL_NO_DTLS1_METHOD
117 IMPLEMENT_dtls1_meth_func(DTLS1_VERSION
, SSL_METHOD_NO_SUITEB
, SSL_OP_NO_DTLSv1
,
120 ossl_statem_connect
, DTLSv1_enc_data
)
122 #ifndef OPENSSL_NO_DTLS1_2_METHOD
123 IMPLEMENT_dtls1_meth_func(DTLS1_2_VERSION
, 0, SSL_OP_NO_DTLSv1_2
,
126 ossl_statem_connect
, DTLSv1_2_enc_data
)
128 IMPLEMENT_dtls1_meth_func(DTLS_ANY_VERSION
, 0, 0,
131 ossl_statem_connect
, DTLSv1_2_enc_data
)
134 * DTLS server methods
136 #ifndef OPENSSL_NO_DTLS1_METHOD
137 IMPLEMENT_dtls1_meth_func(DTLS1_VERSION
, SSL_METHOD_NO_SUITEB
, SSL_OP_NO_DTLSv1
,
138 dtlsv1_server_method
,
140 ssl_undefined_function
, DTLSv1_enc_data
)
142 #ifndef OPENSSL_NO_DTLS1_2_METHOD
143 IMPLEMENT_dtls1_meth_func(DTLS1_2_VERSION
, 0, SSL_OP_NO_DTLSv1_2
,
144 dtlsv1_2_server_method
,
146 ssl_undefined_function
, DTLSv1_2_enc_data
)
148 IMPLEMENT_dtls1_meth_func(DTLS_ANY_VERSION
, 0, 0,
151 ssl_undefined_function
, DTLSv1_2_enc_data
)
154 * DTLS client methods
156 #ifndef OPENSSL_NO_DTLS1_METHOD
157 IMPLEMENT_dtls1_meth_func(DTLS1_VERSION
, SSL_METHOD_NO_SUITEB
, SSL_OP_NO_DTLSv1
,
158 dtlsv1_client_method
,
159 ssl_undefined_function
,
160 ossl_statem_connect
, DTLSv1_enc_data
)
161 IMPLEMENT_dtls1_meth_func(DTLS1_BAD_VER
, SSL_METHOD_NO_SUITEB
, SSL_OP_NO_DTLSv1
,
162 dtls_bad_ver_client_method
,
163 ssl_undefined_function
,
164 ossl_statem_connect
, DTLSv1_enc_data
)
166 #ifndef OPENSSL_NO_DTLS1_2_METHOD
167 IMPLEMENT_dtls1_meth_func(DTLS1_2_VERSION
, 0, SSL_OP_NO_DTLSv1_2
,
168 dtlsv1_2_client_method
,
169 ssl_undefined_function
,
170 ossl_statem_connect
, DTLSv1_2_enc_data
)
172 IMPLEMENT_dtls1_meth_func(DTLS_ANY_VERSION
, 0, 0,
174 ssl_undefined_function
,
175 ossl_statem_connect
, DTLSv1_2_enc_data
)
176 #ifndef OPENSSL_NO_DEPRECATED_1_1_0
177 # ifndef OPENSSL_NO_TLS1_2_METHOD
178 const SSL_METHOD
*TLSv1_2_method(void)
180 return tlsv1_2_method();
183 const SSL_METHOD
*TLSv1_2_server_method(void)
185 return tlsv1_2_server_method();
188 const SSL_METHOD
*TLSv1_2_client_method(void)
190 return tlsv1_2_client_method();
194 # ifndef OPENSSL_NO_TLS1_1_METHOD
195 const SSL_METHOD
*TLSv1_1_method(void)
197 return tlsv1_1_method();
200 const SSL_METHOD
*TLSv1_1_server_method(void)
202 return tlsv1_1_server_method();
205 const SSL_METHOD
*TLSv1_1_client_method(void)
207 return tlsv1_1_client_method();
211 # ifndef OPENSSL_NO_TLS1_METHOD
212 const SSL_METHOD
*TLSv1_method(void)
214 return tlsv1_method();
217 const SSL_METHOD
*TLSv1_server_method(void)
219 return tlsv1_server_method();
222 const SSL_METHOD
*TLSv1_client_method(void)
224 return tlsv1_client_method();
228 # ifndef OPENSSL_NO_SSL3_METHOD
229 const SSL_METHOD
*SSLv3_method(void)
231 return sslv3_method();
234 const SSL_METHOD
*SSLv3_server_method(void)
236 return sslv3_server_method();
239 const SSL_METHOD
*SSLv3_client_method(void)
241 return sslv3_client_method();
245 # ifndef OPENSSL_NO_DTLS1_2_METHOD
246 const SSL_METHOD
*DTLSv1_2_method(void)
248 return dtlsv1_2_method();
251 const SSL_METHOD
*DTLSv1_2_server_method(void)
253 return dtlsv1_2_server_method();
256 const SSL_METHOD
*DTLSv1_2_client_method(void)
258 return dtlsv1_2_client_method();
262 # ifndef OPENSSL_NO_DTLS1_METHOD
263 const SSL_METHOD
*DTLSv1_method(void)
265 return dtlsv1_method();
268 const SSL_METHOD
*DTLSv1_server_method(void)
270 return dtlsv1_server_method();
273 const SSL_METHOD
*DTLSv1_client_method(void)
275 return dtlsv1_client_method();