]>
Commit | Line | Data |
---|---|---|
846e33c7 RS |
1 | /* |
2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. | |
8ba708e5 | 3 | * |
2c18d164 | 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use |
846e33c7 RS |
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 | |
8ba708e5 | 8 | */ |
2b8fa1d5 | 9 | |
8ba708e5 MC |
10 | #include <stdio.h> |
11 | #include <openssl/objects.h> | |
12 | #include "ssl_locl.h" | |
13 | ||
a230b26e | 14 | /*- |
8ba708e5 MC |
15 | * TLS/SSLv3 methods |
16 | */ | |
17 | ||
4fa52141 VD |
18 | IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, 0, 0, |
19 | TLS_method, | |
fe3a3291 | 20 | ossl_statem_accept, |
ccae4a15 | 21 | ossl_statem_connect, TLSv1_2_enc_data) |
582a17d6 MC |
22 | IMPLEMENT_tls_meth_func(TLS1_3_VERSION, 0, SSL_OP_NO_TLSv1_3, |
23 | tlsv1_3_method, | |
24 | ossl_statem_accept, | |
25 | ossl_statem_connect, TLSv1_3_enc_data) | |
6b01bed2 | 26 | #ifndef OPENSSL_NO_TLS1_2_METHOD |
4fa52141 | 27 | IMPLEMENT_tls_meth_func(TLS1_2_VERSION, 0, SSL_OP_NO_TLSv1_2, |
2b8fa1d5 | 28 | tlsv1_2_method, |
fe3a3291 | 29 | ossl_statem_accept, |
ccae4a15 | 30 | ossl_statem_connect, TLSv1_2_enc_data) |
6b01bed2 | 31 | #endif |
6b01bed2 | 32 | #ifndef OPENSSL_NO_TLS1_1_METHOD |
4fa52141 | 33 | IMPLEMENT_tls_meth_func(TLS1_1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1_1, |
2b8fa1d5 | 34 | tlsv1_1_method, |
fe3a3291 | 35 | ossl_statem_accept, |
ccae4a15 | 36 | ossl_statem_connect, TLSv1_1_enc_data) |
6b01bed2 | 37 | #endif |
6b01bed2 | 38 | #ifndef OPENSSL_NO_TLS1_METHOD |
4fa52141 | 39 | IMPLEMENT_tls_meth_func(TLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1, |
2b8fa1d5 | 40 | tlsv1_method, |
a230b26e | 41 | ossl_statem_accept, ossl_statem_connect, TLSv1_enc_data) |
6b01bed2 | 42 | #endif |
8ba708e5 | 43 | #ifndef OPENSSL_NO_SSL3_METHOD |
ccae4a15 | 44 | IMPLEMENT_ssl3_meth_func(sslv3_method, ossl_statem_accept, ossl_statem_connect) |
8ba708e5 | 45 | #endif |
a230b26e | 46 | /*- |
8ba708e5 MC |
47 | * TLS/SSLv3 server methods |
48 | */ | |
4fa52141 VD |
49 | IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, 0, 0, |
50 | TLS_server_method, | |
fe3a3291 | 51 | ossl_statem_accept, |
a230b26e | 52 | ssl_undefined_function, TLSv1_2_enc_data) |
582a17d6 MC |
53 | IMPLEMENT_tls_meth_func(TLS1_3_VERSION, 0, SSL_OP_NO_TLSv1_3, |
54 | tlsv1_3_server_method, | |
55 | ossl_statem_accept, | |
56 | ssl_undefined_function, TLSv1_3_enc_data) | |
6b01bed2 | 57 | #ifndef OPENSSL_NO_TLS1_2_METHOD |
4fa52141 | 58 | IMPLEMENT_tls_meth_func(TLS1_2_VERSION, 0, SSL_OP_NO_TLSv1_2, |
2b8fa1d5 | 59 | tlsv1_2_server_method, |
fe3a3291 | 60 | ossl_statem_accept, |
a230b26e | 61 | ssl_undefined_function, TLSv1_2_enc_data) |
6b01bed2 | 62 | #endif |
6b01bed2 | 63 | #ifndef OPENSSL_NO_TLS1_1_METHOD |
4fa52141 | 64 | IMPLEMENT_tls_meth_func(TLS1_1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1_1, |
2b8fa1d5 | 65 | tlsv1_1_server_method, |
fe3a3291 | 66 | ossl_statem_accept, |
a230b26e | 67 | ssl_undefined_function, TLSv1_1_enc_data) |
6b01bed2 | 68 | #endif |
6b01bed2 | 69 | #ifndef OPENSSL_NO_TLS1_METHOD |
4fa52141 | 70 | IMPLEMENT_tls_meth_func(TLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1, |
2b8fa1d5 | 71 | tlsv1_server_method, |
fe3a3291 | 72 | ossl_statem_accept, |
a230b26e | 73 | ssl_undefined_function, TLSv1_enc_data) |
6b01bed2 | 74 | #endif |
8ba708e5 | 75 | #ifndef OPENSSL_NO_SSL3_METHOD |
2b8fa1d5 | 76 | IMPLEMENT_ssl3_meth_func(sslv3_server_method, |
a230b26e | 77 | ossl_statem_accept, ssl_undefined_function) |
8ba708e5 | 78 | #endif |
a230b26e | 79 | /*- |
8ba708e5 MC |
80 | * TLS/SSLv3 client methods |
81 | */ | |
4fa52141 VD |
82 | IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, 0, 0, |
83 | TLS_client_method, | |
8ba708e5 | 84 | ssl_undefined_function, |
a230b26e | 85 | ossl_statem_connect, TLSv1_2_enc_data) |
582a17d6 MC |
86 | IMPLEMENT_tls_meth_func(TLS1_3_VERSION, 0, SSL_OP_NO_TLSv1_3, |
87 | tlsv1_3_client_method, | |
88 | ssl_undefined_function, | |
89 | ossl_statem_connect, TLSv1_3_enc_data) | |
6b01bed2 | 90 | #ifndef OPENSSL_NO_TLS1_2_METHOD |
4fa52141 | 91 | IMPLEMENT_tls_meth_func(TLS1_2_VERSION, 0, SSL_OP_NO_TLSv1_2, |
2b8fa1d5 | 92 | tlsv1_2_client_method, |
8ba708e5 | 93 | ssl_undefined_function, |
a230b26e | 94 | ossl_statem_connect, TLSv1_2_enc_data) |
6b01bed2 | 95 | #endif |
6b01bed2 | 96 | #ifndef OPENSSL_NO_TLS1_1_METHOD |
4fa52141 | 97 | IMPLEMENT_tls_meth_func(TLS1_1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1_1, |
2b8fa1d5 | 98 | tlsv1_1_client_method, |
8ba708e5 | 99 | ssl_undefined_function, |
a230b26e | 100 | ossl_statem_connect, TLSv1_1_enc_data) |
6b01bed2 | 101 | #endif |
6b01bed2 | 102 | #ifndef OPENSSL_NO_TLS1_METHOD |
4fa52141 | 103 | IMPLEMENT_tls_meth_func(TLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1, |
2b8fa1d5 | 104 | tlsv1_client_method, |
8ba708e5 | 105 | ssl_undefined_function, |
a230b26e | 106 | ossl_statem_connect, TLSv1_enc_data) |
6b01bed2 | 107 | #endif |
8ba708e5 | 108 | #ifndef OPENSSL_NO_SSL3_METHOD |
2b8fa1d5 | 109 | IMPLEMENT_ssl3_meth_func(sslv3_client_method, |
a230b26e | 110 | ssl_undefined_function, ossl_statem_connect) |
8ba708e5 | 111 | #endif |
a230b26e | 112 | /*- |
8ba708e5 MC |
113 | * DTLS methods |
114 | */ | |
6b01bed2 | 115 | #ifndef OPENSSL_NO_DTLS1_METHOD |
4fa52141 | 116 | IMPLEMENT_dtls1_meth_func(DTLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_DTLSv1, |
2b8fa1d5 | 117 | dtlsv1_method, |
fe3a3291 | 118 | ossl_statem_accept, |
a230b26e | 119 | ossl_statem_connect, DTLSv1_enc_data) |
6b01bed2 | 120 | #endif |
6b01bed2 | 121 | #ifndef OPENSSL_NO_DTLS1_2_METHOD |
4fa52141 | 122 | IMPLEMENT_dtls1_meth_func(DTLS1_2_VERSION, 0, SSL_OP_NO_DTLSv1_2, |
2b8fa1d5 | 123 | dtlsv1_2_method, |
fe3a3291 | 124 | ossl_statem_accept, |
a230b26e | 125 | ossl_statem_connect, DTLSv1_2_enc_data) |
6b01bed2 | 126 | #endif |
4fa52141 | 127 | IMPLEMENT_dtls1_meth_func(DTLS_ANY_VERSION, 0, 0, |
8ba708e5 | 128 | DTLS_method, |
fe3a3291 | 129 | ossl_statem_accept, |
a230b26e | 130 | ossl_statem_connect, DTLSv1_2_enc_data) |
8ba708e5 | 131 | |
a230b26e | 132 | /*- |
8ba708e5 MC |
133 | * DTLS server methods |
134 | */ | |
6b01bed2 | 135 | #ifndef OPENSSL_NO_DTLS1_METHOD |
4fa52141 | 136 | IMPLEMENT_dtls1_meth_func(DTLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_DTLSv1, |
2b8fa1d5 | 137 | dtlsv1_server_method, |
fe3a3291 | 138 | ossl_statem_accept, |
a230b26e | 139 | ssl_undefined_function, DTLSv1_enc_data) |
6b01bed2 | 140 | #endif |
6b01bed2 | 141 | #ifndef OPENSSL_NO_DTLS1_2_METHOD |
4fa52141 | 142 | IMPLEMENT_dtls1_meth_func(DTLS1_2_VERSION, 0, SSL_OP_NO_DTLSv1_2, |
2b8fa1d5 | 143 | dtlsv1_2_server_method, |
fe3a3291 | 144 | ossl_statem_accept, |
a230b26e | 145 | ssl_undefined_function, DTLSv1_2_enc_data) |
6b01bed2 | 146 | #endif |
4fa52141 | 147 | IMPLEMENT_dtls1_meth_func(DTLS_ANY_VERSION, 0, 0, |
8ba708e5 | 148 | DTLS_server_method, |
fe3a3291 | 149 | ossl_statem_accept, |
a230b26e | 150 | ssl_undefined_function, DTLSv1_2_enc_data) |
8ba708e5 | 151 | |
a230b26e | 152 | /*- |
8ba708e5 MC |
153 | * DTLS client methods |
154 | */ | |
6b01bed2 | 155 | #ifndef OPENSSL_NO_DTLS1_METHOD |
4fa52141 | 156 | IMPLEMENT_dtls1_meth_func(DTLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_DTLSv1, |
2b8fa1d5 | 157 | dtlsv1_client_method, |
8ba708e5 | 158 | ssl_undefined_function, |
a230b26e | 159 | ossl_statem_connect, DTLSv1_enc_data) |
032924c4 DW |
160 | IMPLEMENT_dtls1_meth_func(DTLS1_BAD_VER, SSL_METHOD_NO_SUITEB, SSL_OP_NO_DTLSv1, |
161 | dtls_bad_ver_client_method, | |
162 | ssl_undefined_function, | |
a230b26e | 163 | ossl_statem_connect, DTLSv1_enc_data) |
6b01bed2 | 164 | #endif |
6b01bed2 | 165 | #ifndef OPENSSL_NO_DTLS1_2_METHOD |
4fa52141 | 166 | IMPLEMENT_dtls1_meth_func(DTLS1_2_VERSION, 0, SSL_OP_NO_DTLSv1_2, |
2b8fa1d5 | 167 | dtlsv1_2_client_method, |
8ba708e5 | 168 | ssl_undefined_function, |
a230b26e | 169 | ossl_statem_connect, DTLSv1_2_enc_data) |
6b01bed2 | 170 | #endif |
4fa52141 | 171 | IMPLEMENT_dtls1_meth_func(DTLS_ANY_VERSION, 0, 0, |
8ba708e5 MC |
172 | DTLS_client_method, |
173 | ssl_undefined_function, | |
a230b26e | 174 | ossl_statem_connect, DTLSv1_2_enc_data) |
fcd2d5a6 | 175 | #if !OPENSSL_API_1_1_0 |
2b8fa1d5 KR |
176 | # ifndef OPENSSL_NO_TLS1_2_METHOD |
177 | const SSL_METHOD *TLSv1_2_method(void) | |
178 | { | |
179 | return tlsv1_2_method(); | |
180 | } | |
181 | ||
182 | const SSL_METHOD *TLSv1_2_server_method(void) | |
183 | { | |
184 | return tlsv1_2_server_method(); | |
185 | } | |
186 | ||
187 | const SSL_METHOD *TLSv1_2_client_method(void) | |
188 | { | |
189 | return tlsv1_2_client_method(); | |
190 | } | |
191 | # endif | |
192 | ||
193 | # ifndef OPENSSL_NO_TLS1_1_METHOD | |
194 | const SSL_METHOD *TLSv1_1_method(void) | |
195 | { | |
196 | return tlsv1_1_method(); | |
197 | } | |
198 | ||
199 | const SSL_METHOD *TLSv1_1_server_method(void) | |
200 | { | |
201 | return tlsv1_1_server_method(); | |
202 | } | |
203 | ||
204 | const SSL_METHOD *TLSv1_1_client_method(void) | |
205 | { | |
206 | return tlsv1_1_client_method(); | |
207 | } | |
208 | # endif | |
209 | ||
210 | # ifndef OPENSSL_NO_TLS1_METHOD | |
211 | const SSL_METHOD *TLSv1_method(void) | |
212 | { | |
213 | return tlsv1_method(); | |
214 | } | |
215 | ||
216 | const SSL_METHOD *TLSv1_server_method(void) | |
217 | { | |
218 | return tlsv1_server_method(); | |
219 | } | |
220 | ||
221 | const SSL_METHOD *TLSv1_client_method(void) | |
222 | { | |
223 | return tlsv1_client_method(); | |
224 | } | |
225 | # endif | |
226 | ||
227 | # ifndef OPENSSL_NO_SSL3_METHOD | |
228 | const SSL_METHOD *SSLv3_method(void) | |
229 | { | |
230 | return sslv3_method(); | |
231 | } | |
232 | ||
233 | const SSL_METHOD *SSLv3_server_method(void) | |
234 | { | |
235 | return sslv3_server_method(); | |
236 | } | |
237 | ||
238 | const SSL_METHOD *SSLv3_client_method(void) | |
239 | { | |
240 | return sslv3_client_method(); | |
241 | } | |
242 | # endif | |
243 | ||
244 | # ifndef OPENSSL_NO_DTLS1_2_METHOD | |
245 | const SSL_METHOD *DTLSv1_2_method(void) | |
246 | { | |
247 | return dtlsv1_2_method(); | |
248 | } | |
249 | ||
250 | const SSL_METHOD *DTLSv1_2_server_method(void) | |
251 | { | |
252 | return dtlsv1_2_server_method(); | |
253 | } | |
254 | ||
255 | const SSL_METHOD *DTLSv1_2_client_method(void) | |
256 | { | |
257 | return dtlsv1_2_client_method(); | |
258 | } | |
259 | # endif | |
260 | ||
261 | # ifndef OPENSSL_NO_DTLS1_METHOD | |
262 | const SSL_METHOD *DTLSv1_method(void) | |
263 | { | |
264 | return dtlsv1_method(); | |
265 | } | |
266 | ||
267 | const SSL_METHOD *DTLSv1_server_method(void) | |
268 | { | |
269 | return dtlsv1_server_method(); | |
270 | } | |
271 | ||
272 | const SSL_METHOD *DTLSv1_client_method(void) | |
273 | { | |
274 | return dtlsv1_client_method(); | |
275 | } | |
276 | # endif | |
277 | ||
278 | #endif |