]> git.ipfire.org Git - thirdparty/openssl.git/blame - ssl/methods.c
Deprecate the use of version-specific methods
[thirdparty/openssl.git] / ssl / methods.c
CommitLineData
8ba708e5
MC
1/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
2 * All rights reserved.
3 *
4 * This package is an SSL implementation written
5 * by Eric Young (eay@cryptsoft.com).
6 * The implementation was written so as to conform with Netscapes SSL.
7 *
8 * This library is free for commercial and non-commercial use as long as
9 * the following conditions are aheared to. The following conditions
10 * apply to all code found in this distribution, be it the RC4, RSA,
11 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
12 * included with this distribution is covered by the same copyright terms
13 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
14 *
15 * Copyright remains Eric Young's, and as such any Copyright notices in
16 * the code are not to be removed.
17 * If this package is used in a product, Eric Young should be given attribution
18 * as the author of the parts of the library used.
19 * This can be in the form of a textual message at program startup or
20 * in documentation (online or textual) provided with the package.
21 *
22 * Redistribution and use in source and binary forms, with or without
23 * modification, are permitted provided that the following conditions
24 * are met:
25 * 1. Redistributions of source code must retain the copyright
26 * notice, this list of conditions and the following disclaimer.
27 * 2. Redistributions in binary form must reproduce the above copyright
28 * notice, this list of conditions and the following disclaimer in the
29 * documentation and/or other materials provided with the distribution.
30 * 3. All advertising materials mentioning features or use of this software
31 * must display the following acknowledgement:
32 * "This product includes cryptographic software written by
33 * Eric Young (eay@cryptsoft.com)"
34 * The word 'cryptographic' can be left out if the rouines from the library
35 * being used are not cryptographic related :-).
36 * 4. If you include any Windows specific code (or a derivative thereof) from
37 * the apps directory (application code) you must include an acknowledgement:
38 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
39 *
40 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
41 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
43 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
44 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
45 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
46 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
48 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
49 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
50 * SUCH DAMAGE.
51 *
52 * The licence and distribution terms for any publically available version or
53 * derivative of this code cannot be changed. i.e. this code cannot simply be
54 * copied and put under another distribution licence
55 * [including the GNU Public Licence.]
56 */
57/* ====================================================================
58 * Copyright (c) 1998-2015 The OpenSSL Project. All rights reserved.
59 *
60 * Redistribution and use in source and binary forms, with or without
61 * modification, are permitted provided that the following conditions
62 * are met:
63 *
64 * 1. Redistributions of source code must retain the above copyright
65 * notice, this list of conditions and the following disclaimer.
66 *
67 * 2. Redistributions in binary form must reproduce the above copyright
68 * notice, this list of conditions and the following disclaimer in
69 * the documentation and/or other materials provided with the
70 * distribution.
71 *
72 * 3. All advertising materials mentioning features or use of this
73 * software must display the following acknowledgment:
74 * "This product includes software developed by the OpenSSL Project
75 * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
76 *
77 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
78 * endorse or promote products derived from this software without
79 * prior written permission. For written permission, please contact
80 * openssl-core@openssl.org.
81 *
82 * 5. Products derived from this software may not be called "OpenSSL"
83 * nor may "OpenSSL" appear in their names without prior written
84 * permission of the OpenSSL Project.
85 *
86 * 6. Redistributions of any form whatsoever must retain the following
87 * acknowledgment:
88 * "This product includes software developed by the OpenSSL Project
89 * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
90 *
91 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
92 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
93 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
94 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
95 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
96 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
97 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
98 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
99 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
100 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
101 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
102 * OF THE POSSIBILITY OF SUCH DAMAGE.
103 * ====================================================================
104 *
105 * This product includes cryptographic software written by Eric Young
106 * (eay@cryptsoft.com). This product includes software written by Tim
107 * Hudson (tjh@cryptsoft.com).
108 *
109 */
2b8fa1d5 110
8ba708e5
MC
111#include <stdio.h>
112#include <openssl/objects.h>
113#include "ssl_locl.h"
114
115/*
116 * TLS/SSLv3 methods
117 */
118
119static const SSL_METHOD *tls1_get_method(int ver)
120{
121 if (ver == TLS_ANY_VERSION)
122 return TLS_method();
6b01bed2 123#ifndef OPENSSL_NO_TLS1_2
8ba708e5 124 if (ver == TLS1_2_VERSION)
2b8fa1d5 125 return tlsv1_2_method();
6b01bed2
VD
126#endif
127#ifndef OPENSSL_NO_TLS1_1
8ba708e5 128 if (ver == TLS1_1_VERSION)
2b8fa1d5 129 return tlsv1_1_method();
6b01bed2
VD
130#endif
131#ifndef OPENSSL_NO_TLS1
8ba708e5 132 if (ver == TLS1_VERSION)
2b8fa1d5 133 return tlsv1_method();
6b01bed2 134#endif
8ba708e5
MC
135#ifndef OPENSSL_NO_SSL3
136 if (ver == SSL3_VERSION)
2b8fa1d5 137 return (sslv3_method());
8ba708e5
MC
138 else
139#endif
140 return NULL;
141}
142
4fa52141
VD
143IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, 0, 0,
144 TLS_method,
fe3a3291
MC
145 ossl_statem_accept,
146 ossl_statem_connect, tls1_get_method, TLSv1_2_enc_data)
8ba708e5 147
6b01bed2 148#ifndef OPENSSL_NO_TLS1_2_METHOD
4fa52141 149IMPLEMENT_tls_meth_func(TLS1_2_VERSION, 0, SSL_OP_NO_TLSv1_2,
2b8fa1d5 150 tlsv1_2_method,
fe3a3291
MC
151 ossl_statem_accept,
152 ossl_statem_connect, tls1_get_method, TLSv1_2_enc_data)
6b01bed2 153#endif
8ba708e5 154
6b01bed2 155#ifndef OPENSSL_NO_TLS1_1_METHOD
4fa52141 156IMPLEMENT_tls_meth_func(TLS1_1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1_1,
2b8fa1d5 157 tlsv1_1_method,
fe3a3291
MC
158 ossl_statem_accept,
159 ossl_statem_connect, tls1_get_method, TLSv1_1_enc_data)
6b01bed2 160#endif
8ba708e5 161
6b01bed2 162#ifndef OPENSSL_NO_TLS1_METHOD
4fa52141 163IMPLEMENT_tls_meth_func(TLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1,
2b8fa1d5 164 tlsv1_method,
fe3a3291
MC
165 ossl_statem_accept,
166 ossl_statem_connect, tls1_get_method, TLSv1_enc_data)
6b01bed2 167#endif
8ba708e5
MC
168
169#ifndef OPENSSL_NO_SSL3_METHOD
2b8fa1d5 170IMPLEMENT_ssl3_meth_func(sslv3_method, ossl_statem_accept, ossl_statem_connect,
fe3a3291 171 tls1_get_method)
8ba708e5
MC
172#endif
173
174
175/*
176 * TLS/SSLv3 server methods
177 */
178
179static const SSL_METHOD *tls1_get_server_method(int ver)
180{
181 if (ver == TLS_ANY_VERSION)
182 return TLS_server_method();
6b01bed2 183#ifndef OPENSSL_NO_TLS1_2
8ba708e5 184 if (ver == TLS1_2_VERSION)
2b8fa1d5 185 return tlsv1_2_server_method();
6b01bed2
VD
186#endif
187#ifndef OPENSSL_NO_TLS1_1
8ba708e5 188 if (ver == TLS1_1_VERSION)
2b8fa1d5 189 return tlsv1_1_server_method();
6b01bed2
VD
190#endif
191#ifndef OPENSSL_NO_TLS1
8ba708e5 192 if (ver == TLS1_VERSION)
2b8fa1d5 193 return tlsv1_server_method();
6b01bed2 194#endif
8ba708e5
MC
195#ifndef OPENSSL_NO_SSL3
196 if (ver == SSL3_VERSION)
2b8fa1d5 197 return (sslv3_server_method());
8ba708e5
MC
198#endif
199 return NULL;
200}
201
4fa52141
VD
202IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, 0, 0,
203 TLS_server_method,
fe3a3291 204 ossl_statem_accept,
8ba708e5
MC
205 ssl_undefined_function,
206 tls1_get_server_method, TLSv1_2_enc_data)
207
6b01bed2 208#ifndef OPENSSL_NO_TLS1_2_METHOD
4fa52141 209IMPLEMENT_tls_meth_func(TLS1_2_VERSION, 0, SSL_OP_NO_TLSv1_2,
2b8fa1d5 210 tlsv1_2_server_method,
fe3a3291 211 ossl_statem_accept,
8ba708e5
MC
212 ssl_undefined_function,
213 tls1_get_server_method, TLSv1_2_enc_data)
6b01bed2 214#endif
8ba708e5 215
6b01bed2 216#ifndef OPENSSL_NO_TLS1_1_METHOD
4fa52141 217IMPLEMENT_tls_meth_func(TLS1_1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1_1,
2b8fa1d5 218 tlsv1_1_server_method,
fe3a3291 219 ossl_statem_accept,
8ba708e5
MC
220 ssl_undefined_function,
221 tls1_get_server_method, TLSv1_1_enc_data)
6b01bed2 222#endif
8ba708e5 223
6b01bed2 224#ifndef OPENSSL_NO_TLS1_METHOD
4fa52141 225IMPLEMENT_tls_meth_func(TLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1,
2b8fa1d5 226 tlsv1_server_method,
fe3a3291 227 ossl_statem_accept,
8ba708e5
MC
228 ssl_undefined_function,
229 tls1_get_server_method, TLSv1_enc_data)
6b01bed2 230#endif
8ba708e5
MC
231
232#ifndef OPENSSL_NO_SSL3_METHOD
2b8fa1d5 233IMPLEMENT_ssl3_meth_func(sslv3_server_method,
fe3a3291 234 ossl_statem_accept,
8ba708e5
MC
235 ssl_undefined_function, tls1_get_server_method)
236#endif
237
238
239/*
240 * TLS/SSLv3 client methods
241 */
242
243static const SSL_METHOD *tls1_get_client_method(int ver)
244{
245 if (ver == TLS_ANY_VERSION)
246 return TLS_client_method();
6b01bed2 247#ifndef OPENSSL_NO_TLS1_2
8ba708e5 248 if (ver == TLS1_2_VERSION)
2b8fa1d5 249 return tlsv1_2_client_method();
6b01bed2
VD
250#endif
251#ifndef OPENSSL_NO_TLS1_1
8ba708e5 252 if (ver == TLS1_1_VERSION)
2b8fa1d5 253 return tlsv1_1_client_method();
6b01bed2
VD
254#endif
255#ifndef OPENSSL_NO_TLS1
8ba708e5 256 if (ver == TLS1_VERSION)
2b8fa1d5 257 return tlsv1_client_method();
6b01bed2 258#endif
8ba708e5
MC
259#ifndef OPENSSL_NO_SSL3
260 if (ver == SSL3_VERSION)
2b8fa1d5 261 return (sslv3_client_method());
8ba708e5
MC
262#endif
263 return NULL;
264}
265
4fa52141
VD
266IMPLEMENT_tls_meth_func(TLS_ANY_VERSION, 0, 0,
267 TLS_client_method,
8ba708e5 268 ssl_undefined_function,
fe3a3291 269 ossl_statem_connect,
8ba708e5
MC
270 tls1_get_client_method, TLSv1_2_enc_data)
271
6b01bed2 272#ifndef OPENSSL_NO_TLS1_2_METHOD
4fa52141 273IMPLEMENT_tls_meth_func(TLS1_2_VERSION, 0, SSL_OP_NO_TLSv1_2,
2b8fa1d5 274 tlsv1_2_client_method,
8ba708e5 275 ssl_undefined_function,
fe3a3291 276 ossl_statem_connect,
8ba708e5 277 tls1_get_client_method, TLSv1_2_enc_data)
6b01bed2 278#endif
8ba708e5 279
6b01bed2 280#ifndef OPENSSL_NO_TLS1_1_METHOD
4fa52141 281IMPLEMENT_tls_meth_func(TLS1_1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1_1,
2b8fa1d5 282 tlsv1_1_client_method,
8ba708e5 283 ssl_undefined_function,
fe3a3291 284 ossl_statem_connect,
8ba708e5 285 tls1_get_client_method, TLSv1_1_enc_data)
6b01bed2 286#endif
8ba708e5 287
6b01bed2 288#ifndef OPENSSL_NO_TLS1_METHOD
4fa52141 289IMPLEMENT_tls_meth_func(TLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_TLSv1,
2b8fa1d5 290 tlsv1_client_method,
8ba708e5 291 ssl_undefined_function,
fe3a3291
MC
292 ossl_statem_connect,
293 tls1_get_client_method, TLSv1_enc_data)
6b01bed2 294#endif
8ba708e5
MC
295
296#ifndef OPENSSL_NO_SSL3_METHOD
2b8fa1d5 297IMPLEMENT_ssl3_meth_func(sslv3_client_method,
8ba708e5 298 ssl_undefined_function,
fe3a3291 299 ossl_statem_connect, tls1_get_client_method)
8ba708e5
MC
300#endif
301
302
303/*
304 * DTLS methods
305 */
306static const SSL_METHOD *dtls1_get_method(int ver)
307{
cf0113eb
MC
308 if (ver == DTLS_ANY_VERSION)
309 return DTLS_method();
6b01bed2 310#ifndef OPENSSL_NO_DTLS1
cf0113eb 311 else if (ver == DTLS1_VERSION)
2b8fa1d5 312 return dtlsv1_method();
6b01bed2
VD
313#endif
314#ifndef OPENSSL_NO_DTLS1_2
8ba708e5 315 else if (ver == DTLS1_2_VERSION)
2b8fa1d5 316 return dtlsv1_2_method();
6b01bed2 317#endif
8ba708e5 318 else
cf0113eb 319 return NULL;
8ba708e5
MC
320}
321
6b01bed2 322#ifndef OPENSSL_NO_DTLS1_METHOD
4fa52141 323IMPLEMENT_dtls1_meth_func(DTLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_DTLSv1,
2b8fa1d5 324 dtlsv1_method,
fe3a3291
MC
325 ossl_statem_accept,
326 ossl_statem_connect,
327 dtls1_get_method, DTLSv1_enc_data)
6b01bed2 328#endif
8ba708e5 329
6b01bed2 330#ifndef OPENSSL_NO_DTLS1_2_METHOD
4fa52141 331IMPLEMENT_dtls1_meth_func(DTLS1_2_VERSION, 0, SSL_OP_NO_DTLSv1_2,
2b8fa1d5 332 dtlsv1_2_method,
fe3a3291
MC
333 ossl_statem_accept,
334 ossl_statem_connect,
335 dtls1_get_method, DTLSv1_2_enc_data)
6b01bed2 336#endif
8ba708e5 337
4fa52141 338IMPLEMENT_dtls1_meth_func(DTLS_ANY_VERSION, 0, 0,
8ba708e5 339 DTLS_method,
fe3a3291
MC
340 ossl_statem_accept,
341 ossl_statem_connect,
342 dtls1_get_method, DTLSv1_2_enc_data)
8ba708e5 343
8ba708e5
MC
344/*
345 * DTLS server methods
346 */
347
348static const SSL_METHOD *dtls1_get_server_method(int ver)
349{
cf0113eb
MC
350 if (ver == DTLS_ANY_VERSION)
351 return DTLS_server_method();
6b01bed2 352#ifndef OPENSSL_NO_DTLS1
cf0113eb 353 else if (ver == DTLS1_VERSION)
2b8fa1d5 354 return dtlsv1_server_method();
6b01bed2
VD
355#endif
356#ifndef OPENSSL_NO_DTLS1_2
8ba708e5 357 else if (ver == DTLS1_2_VERSION)
2b8fa1d5 358 return dtlsv1_2_server_method();
6b01bed2 359#endif
8ba708e5 360 else
cf0113eb 361 return NULL;
8ba708e5
MC
362}
363
6b01bed2 364#ifndef OPENSSL_NO_DTLS1_METHOD
4fa52141 365IMPLEMENT_dtls1_meth_func(DTLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_DTLSv1,
2b8fa1d5 366 dtlsv1_server_method,
fe3a3291 367 ossl_statem_accept,
8ba708e5
MC
368 ssl_undefined_function,
369 dtls1_get_server_method, DTLSv1_enc_data)
6b01bed2 370#endif
8ba708e5 371
6b01bed2 372#ifndef OPENSSL_NO_DTLS1_2_METHOD
4fa52141 373IMPLEMENT_dtls1_meth_func(DTLS1_2_VERSION, 0, SSL_OP_NO_DTLSv1_2,
2b8fa1d5 374 dtlsv1_2_server_method,
fe3a3291 375 ossl_statem_accept,
8ba708e5
MC
376 ssl_undefined_function,
377 dtls1_get_server_method, DTLSv1_2_enc_data)
6b01bed2 378#endif
8ba708e5 379
4fa52141 380IMPLEMENT_dtls1_meth_func(DTLS_ANY_VERSION, 0, 0,
8ba708e5 381 DTLS_server_method,
fe3a3291 382 ossl_statem_accept,
8ba708e5
MC
383 ssl_undefined_function,
384 dtls1_get_server_method, DTLSv1_2_enc_data)
385
386
387/*
388 * DTLS client methods
389 */
390
391static const SSL_METHOD *dtls1_get_client_method(int ver)
392{
cf0113eb
MC
393 if (ver == DTLS_ANY_VERSION)
394 return DTLS_client_method();
6b01bed2 395#ifndef OPENSSL_NO_DTLS1
cf0113eb 396 else if (ver == DTLS1_VERSION || ver == DTLS1_BAD_VER)
2b8fa1d5 397 return dtlsv1_client_method();
6b01bed2
VD
398#endif
399#ifndef OPENSSL_NO_DTLS1_2
8ba708e5 400 else if (ver == DTLS1_2_VERSION)
2b8fa1d5 401 return dtlsv1_2_client_method();
6b01bed2 402#endif
8ba708e5 403 else
cf0113eb 404 return NULL;
8ba708e5
MC
405}
406
6b01bed2 407#ifndef OPENSSL_NO_DTLS1_METHOD
4fa52141 408IMPLEMENT_dtls1_meth_func(DTLS1_VERSION, SSL_METHOD_NO_SUITEB, SSL_OP_NO_DTLSv1,
2b8fa1d5 409 dtlsv1_client_method,
8ba708e5 410 ssl_undefined_function,
fe3a3291 411 ossl_statem_connect,
8ba708e5 412 dtls1_get_client_method, DTLSv1_enc_data)
6b01bed2 413#endif
8ba708e5 414
6b01bed2 415#ifndef OPENSSL_NO_DTLS1_2_METHOD
4fa52141 416IMPLEMENT_dtls1_meth_func(DTLS1_2_VERSION, 0, SSL_OP_NO_DTLSv1_2,
2b8fa1d5 417 dtlsv1_2_client_method,
8ba708e5 418 ssl_undefined_function,
fe3a3291 419 ossl_statem_connect,
8ba708e5 420 dtls1_get_client_method, DTLSv1_2_enc_data)
6b01bed2 421#endif
8ba708e5 422
4fa52141 423IMPLEMENT_dtls1_meth_func(DTLS_ANY_VERSION, 0, 0,
8ba708e5
MC
424 DTLS_client_method,
425 ssl_undefined_function,
fe3a3291 426 ossl_statem_connect,
8ba708e5 427 dtls1_get_client_method, DTLSv1_2_enc_data)
2b8fa1d5
KR
428
429#if OPENSSL_API_COMPAT < 0x10100000L
430
431# ifndef OPENSSL_NO_TLS1_2_METHOD
432const SSL_METHOD *TLSv1_2_method(void)
433{
434 return tlsv1_2_method();
435}
436
437const SSL_METHOD *TLSv1_2_server_method(void)
438{
439 return tlsv1_2_server_method();
440}
441
442const SSL_METHOD *TLSv1_2_client_method(void)
443{
444 return tlsv1_2_client_method();
445}
446# endif
447
448# ifndef OPENSSL_NO_TLS1_1_METHOD
449const SSL_METHOD *TLSv1_1_method(void)
450{
451 return tlsv1_1_method();
452}
453
454const SSL_METHOD *TLSv1_1_server_method(void)
455{
456 return tlsv1_1_server_method();
457}
458
459const SSL_METHOD *TLSv1_1_client_method(void)
460{
461 return tlsv1_1_client_method();
462}
463# endif
464
465# ifndef OPENSSL_NO_TLS1_METHOD
466const SSL_METHOD *TLSv1_method(void)
467{
468 return tlsv1_method();
469}
470
471const SSL_METHOD *TLSv1_server_method(void)
472{
473 return tlsv1_server_method();
474}
475
476const SSL_METHOD *TLSv1_client_method(void)
477{
478 return tlsv1_client_method();
479}
480# endif
481
482# ifndef OPENSSL_NO_SSL3_METHOD
483const SSL_METHOD *SSLv3_method(void)
484{
485 return sslv3_method();
486}
487
488const SSL_METHOD *SSLv3_server_method(void)
489{
490 return sslv3_server_method();
491}
492
493const SSL_METHOD *SSLv3_client_method(void)
494{
495 return sslv3_client_method();
496}
497# endif
498
499# ifndef OPENSSL_NO_DTLS1_2_METHOD
500const SSL_METHOD *DTLSv1_2_method(void)
501{
502 return dtlsv1_2_method();
503}
504
505const SSL_METHOD *DTLSv1_2_server_method(void)
506{
507 return dtlsv1_2_server_method();
508}
509
510const SSL_METHOD *DTLSv1_2_client_method(void)
511{
512 return dtlsv1_2_client_method();
513}
514# endif
515
516# ifndef OPENSSL_NO_DTLS1_METHOD
517const SSL_METHOD *DTLSv1_method(void)
518{
519 return dtlsv1_method();
520}
521
522const SSL_METHOD *DTLSv1_server_method(void)
523{
524 return dtlsv1_server_method();
525}
526
527const SSL_METHOD *DTLSv1_client_method(void)
528{
529 return dtlsv1_client_method();
530}
531# endif
532
533#endif
534