diff options
| author | jsing <> | 2018-11-05 05:45:15 +0000 |
|---|---|---|
| committer | jsing <> | 2018-11-05 05:45:15 +0000 |
| commit | fb9f160cf8d816f5dd783bf8cad3828d2aa35dbe (patch) | |
| tree | 3f0fe5c046ee4d7240d6ea15879199dca6797790 | |
| parent | 4248d53deb162850abf1ed3e2cb99d6bd43824f2 (diff) | |
| download | openbsd-fb9f160cf8d816f5dd783bf8cad3828d2aa35dbe.tar.gz openbsd-fb9f160cf8d816f5dd783bf8cad3828d2aa35dbe.tar.bz2 openbsd-fb9f160cf8d816f5dd783bf8cad3828d2aa35dbe.zip | |
Consolidate all of the SSL method structs/functions into a single file.
Discussed with tb@
| -rw-r--r-- | src/lib/libssl/Makefile | 8 | ||||
| -rw-r--r-- | src/lib/libssl/d1_clnt.c | 45 | ||||
| -rw-r--r-- | src/lib/libssl/d1_meth.c | 109 | ||||
| -rw-r--r-- | src/lib/libssl/d1_srvr.c | 45 | ||||
| -rw-r--r-- | src/lib/libssl/ssl_methods.c | 666 | ||||
| -rw-r--r-- | src/lib/libssl/t1_clnt.c | 223 | ||||
| -rw-r--r-- | src/lib/libssl/t1_meth.c | 223 | ||||
| -rw-r--r-- | src/lib/libssl/t1_srvr.c | 224 |
8 files changed, 672 insertions, 871 deletions
diff --git a/src/lib/libssl/Makefile b/src/lib/libssl/Makefile index 6a397a7df7..e912562a75 100644 --- a/src/lib/libssl/Makefile +++ b/src/lib/libssl/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.39 2018/03/17 16:20:01 beck Exp $ | 1 | # $OpenBSD: Makefile,v 1.40 2018/11/05 05:45:15 jsing Exp $ |
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
| 4 | .ifndef NOMAN | 4 | .ifndef NOMAN |
| @@ -26,13 +26,13 @@ SYMBOL_LIST= ${.CURDIR}/Symbols.list | |||
| 26 | 26 | ||
| 27 | SRCS= \ | 27 | SRCS= \ |
| 28 | ssl_srvr.c ssl_clnt.c s3_lib.c ssl_pkt.c ssl_both.c \ | 28 | ssl_srvr.c ssl_clnt.c s3_lib.c ssl_pkt.c ssl_both.c \ |
| 29 | t1_meth.c t1_srvr.c t1_clnt.c t1_lib.c t1_enc.c t1_hash.c \ | 29 | t1_lib.c t1_enc.c t1_hash.c \ |
| 30 | d1_meth.c d1_srvr.c d1_clnt.c d1_lib.c d1_pkt.c \ | 30 | d1_srvr.c d1_clnt.c d1_lib.c d1_pkt.c \ |
| 31 | d1_both.c d1_enc.c d1_srtp.c \ | 31 | d1_both.c d1_enc.c d1_srtp.c \ |
| 32 | ssl_lib.c ssl_cert.c ssl_sess.c \ | 32 | ssl_lib.c ssl_cert.c ssl_sess.c \ |
| 33 | ssl_ciph.c ssl_stat.c ssl_rsa.c \ | 33 | ssl_ciph.c ssl_stat.c ssl_rsa.c \ |
| 34 | ssl_asn1.c ssl_txt.c ssl_algs.c \ | 34 | ssl_asn1.c ssl_txt.c ssl_algs.c \ |
| 35 | bio_ssl.c ssl_err.c \ | 35 | bio_ssl.c ssl_err.c ssl_methods.c \ |
| 36 | ssl_packet.c ssl_tlsext.c ssl_versions.c pqueue.c ssl_init.c | 36 | ssl_packet.c ssl_tlsext.c ssl_versions.c pqueue.c ssl_init.c |
| 37 | SRCS+= s3_cbc.c | 37 | SRCS+= s3_cbc.c |
| 38 | SRCS+= bs_ber.c bs_cbb.c bs_cbs.c | 38 | SRCS+= bs_ber.c bs_cbb.c bs_cbs.c |
diff --git a/src/lib/libssl/d1_clnt.c b/src/lib/libssl/d1_clnt.c index 8f60f4a8c4..ee21a1bebc 100644 --- a/src/lib/libssl/d1_clnt.c +++ b/src/lib/libssl/d1_clnt.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: d1_clnt.c,v 1.81 2018/08/30 16:56:16 jsing Exp $ */ | 1 | /* $OpenBSD: d1_clnt.c,v 1.82 2018/11/05 05:45:15 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
| 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
| @@ -127,49 +127,6 @@ | |||
| 127 | 127 | ||
| 128 | #include "bytestring.h" | 128 | #include "bytestring.h" |
| 129 | 129 | ||
| 130 | static const SSL_METHOD_INTERNAL DTLSv1_client_method_internal_data = { | ||
| 131 | .version = DTLS1_VERSION, | ||
| 132 | .min_version = DTLS1_VERSION, | ||
| 133 | .max_version = DTLS1_VERSION, | ||
| 134 | .ssl_new = dtls1_new, | ||
| 135 | .ssl_clear = dtls1_clear, | ||
| 136 | .ssl_free = dtls1_free, | ||
| 137 | .ssl_accept = ssl_undefined_function, | ||
| 138 | .ssl_connect = ssl3_connect, | ||
| 139 | .get_ssl_method = dtls1_get_client_method, | ||
| 140 | .get_timeout = dtls1_default_timeout, | ||
| 141 | .ssl_version = ssl_undefined_void_function, | ||
| 142 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 143 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 144 | .ssl_get_message = dtls1_get_message, | ||
| 145 | .ssl_read_bytes = dtls1_read_bytes, | ||
| 146 | .ssl_write_bytes = dtls1_write_app_data_bytes, | ||
| 147 | .ssl3_enc = &DTLSv1_enc_data, | ||
| 148 | }; | ||
| 149 | |||
| 150 | static const SSL_METHOD DTLSv1_client_method_data = { | ||
| 151 | .ssl_dispatch_alert = dtls1_dispatch_alert, | ||
| 152 | .num_ciphers = ssl3_num_ciphers, | ||
| 153 | .get_cipher = dtls1_get_cipher, | ||
| 154 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 155 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 156 | .internal = &DTLSv1_client_method_internal_data, | ||
| 157 | }; | ||
| 158 | |||
| 159 | const SSL_METHOD * | ||
| 160 | DTLSv1_client_method(void) | ||
| 161 | { | ||
| 162 | return &DTLSv1_client_method_data; | ||
| 163 | } | ||
| 164 | |||
| 165 | const SSL_METHOD * | ||
| 166 | dtls1_get_client_method(int ver) | ||
| 167 | { | ||
| 168 | if (ver == DTLS1_VERSION) | ||
| 169 | return (DTLSv1_client_method()); | ||
| 170 | return (NULL); | ||
| 171 | } | ||
| 172 | |||
| 173 | int | 130 | int |
| 174 | dtls1_get_hello_verify(SSL *s) | 131 | dtls1_get_hello_verify(SSL *s) |
| 175 | { | 132 | { |
diff --git a/src/lib/libssl/d1_meth.c b/src/lib/libssl/d1_meth.c deleted file mode 100644 index e157dc4d93..0000000000 --- a/src/lib/libssl/d1_meth.c +++ /dev/null | |||
| @@ -1,109 +0,0 @@ | |||
| 1 | /* $OpenBSD: d1_meth.c,v 1.17 2018/08/30 16:56:16 jsing Exp $ */ | ||
| 2 | /* | ||
| 3 | * DTLS implementation written by Nagendra Modadugu | ||
| 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | ||
| 5 | */ | ||
| 6 | /* ==================================================================== | ||
| 7 | * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. | ||
| 8 | * | ||
| 9 | * Redistribution and use in source and binary forms, with or without | ||
| 10 | * modification, are permitted provided that the following conditions | ||
| 11 | * are met: | ||
| 12 | * | ||
| 13 | * 1. Redistributions of source code must retain the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer. | ||
| 15 | * | ||
| 16 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 17 | * notice, this list of conditions and the following disclaimer in | ||
| 18 | * the documentation and/or other materials provided with the | ||
| 19 | * distribution. | ||
| 20 | * | ||
| 21 | * 3. All advertising materials mentioning features or use of this | ||
| 22 | * software must display the following acknowledgment: | ||
| 23 | * "This product includes software developed by the OpenSSL Project | ||
| 24 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" | ||
| 25 | * | ||
| 26 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 27 | * endorse or promote products derived from this software without | ||
| 28 | * prior written permission. For written permission, please contact | ||
| 29 | * openssl-core@OpenSSL.org. | ||
| 30 | * | ||
| 31 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 32 | * nor may "OpenSSL" appear in their names without prior written | ||
| 33 | * permission of the OpenSSL Project. | ||
| 34 | * | ||
| 35 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 36 | * acknowledgment: | ||
| 37 | * "This product includes software developed by the OpenSSL Project | ||
| 38 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" | ||
| 39 | * | ||
| 40 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 41 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 42 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 43 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 44 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 45 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 46 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 47 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 49 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 50 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 51 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 52 | * ==================================================================== | ||
| 53 | * | ||
| 54 | * This product includes cryptographic software written by Eric Young | ||
| 55 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 56 | * Hudson (tjh@cryptsoft.com). | ||
| 57 | * | ||
| 58 | */ | ||
| 59 | |||
| 60 | #include <stdio.h> | ||
| 61 | |||
| 62 | #include <openssl/objects.h> | ||
| 63 | |||
| 64 | #include "ssl_locl.h" | ||
| 65 | |||
| 66 | static const SSL_METHOD *dtls1_get_method(int ver); | ||
| 67 | |||
| 68 | static const SSL_METHOD_INTERNAL DTLSv1_method_internal_data = { | ||
| 69 | .version = DTLS1_VERSION, | ||
| 70 | .min_version = DTLS1_VERSION, | ||
| 71 | .max_version = DTLS1_VERSION, | ||
| 72 | .ssl_new = dtls1_new, | ||
| 73 | .ssl_clear = dtls1_clear, | ||
| 74 | .ssl_free = dtls1_free, | ||
| 75 | .ssl_accept = ssl3_accept, | ||
| 76 | .ssl_connect = ssl3_connect, | ||
| 77 | .get_ssl_method = dtls1_get_method, | ||
| 78 | .get_timeout = dtls1_default_timeout, | ||
| 79 | .ssl_version = ssl_undefined_void_function, | ||
| 80 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 81 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 82 | .ssl_get_message = dtls1_get_message, | ||
| 83 | .ssl_read_bytes = dtls1_read_bytes, | ||
| 84 | .ssl_write_bytes = dtls1_write_app_data_bytes, | ||
| 85 | .ssl3_enc = &DTLSv1_enc_data, | ||
| 86 | }; | ||
| 87 | |||
| 88 | static const SSL_METHOD DTLSv1_method_data = { | ||
| 89 | .ssl_dispatch_alert = dtls1_dispatch_alert, | ||
| 90 | .num_ciphers = ssl3_num_ciphers, | ||
| 91 | .get_cipher = dtls1_get_cipher, | ||
| 92 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 93 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 94 | .internal = &DTLSv1_method_internal_data, | ||
| 95 | }; | ||
| 96 | |||
| 97 | const SSL_METHOD * | ||
| 98 | DTLSv1_method(void) | ||
| 99 | { | ||
| 100 | return &DTLSv1_method_data; | ||
| 101 | } | ||
| 102 | |||
| 103 | static const SSL_METHOD * | ||
| 104 | dtls1_get_method(int ver) | ||
| 105 | { | ||
| 106 | if (ver == DTLS1_VERSION) | ||
| 107 | return (DTLSv1_method()); | ||
| 108 | return (NULL); | ||
| 109 | } | ||
diff --git a/src/lib/libssl/d1_srvr.c b/src/lib/libssl/d1_srvr.c index c0ee0d00aa..1a1ee5429e 100644 --- a/src/lib/libssl/d1_srvr.c +++ b/src/lib/libssl/d1_srvr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: d1_srvr.c,v 1.94 2018/08/30 16:56:16 jsing Exp $ */ | 1 | /* $OpenBSD: d1_srvr.c,v 1.95 2018/11/05 05:45:15 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
| 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
| @@ -125,49 +125,6 @@ | |||
| 125 | #include <openssl/objects.h> | 125 | #include <openssl/objects.h> |
| 126 | #include <openssl/x509.h> | 126 | #include <openssl/x509.h> |
| 127 | 127 | ||
| 128 | static const SSL_METHOD_INTERNAL DTLSv1_server_method_internal_data = { | ||
| 129 | .version = DTLS1_VERSION, | ||
| 130 | .min_version = DTLS1_VERSION, | ||
| 131 | .max_version = DTLS1_VERSION, | ||
| 132 | .ssl_new = dtls1_new, | ||
| 133 | .ssl_clear = dtls1_clear, | ||
| 134 | .ssl_free = dtls1_free, | ||
| 135 | .ssl_accept = ssl3_accept, | ||
| 136 | .ssl_connect = ssl_undefined_function, | ||
| 137 | .get_ssl_method = dtls1_get_server_method, | ||
| 138 | .get_timeout = dtls1_default_timeout, | ||
| 139 | .ssl_version = ssl_undefined_void_function, | ||
| 140 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 141 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 142 | .ssl_get_message = dtls1_get_message, | ||
| 143 | .ssl_read_bytes = dtls1_read_bytes, | ||
| 144 | .ssl_write_bytes = dtls1_write_app_data_bytes, | ||
| 145 | .ssl3_enc = &DTLSv1_enc_data, | ||
| 146 | }; | ||
| 147 | |||
| 148 | static const SSL_METHOD DTLSv1_server_method_data = { | ||
| 149 | .ssl_dispatch_alert = dtls1_dispatch_alert, | ||
| 150 | .num_ciphers = ssl3_num_ciphers, | ||
| 151 | .get_cipher = dtls1_get_cipher, | ||
| 152 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 153 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 154 | .internal = &DTLSv1_server_method_internal_data, | ||
| 155 | }; | ||
| 156 | |||
| 157 | const SSL_METHOD * | ||
| 158 | DTLSv1_server_method(void) | ||
| 159 | { | ||
| 160 | return &DTLSv1_server_method_data; | ||
| 161 | } | ||
| 162 | |||
| 163 | const SSL_METHOD * | ||
| 164 | dtls1_get_server_method(int ver) | ||
| 165 | { | ||
| 166 | if (ver == DTLS1_VERSION) | ||
| 167 | return (DTLSv1_server_method()); | ||
| 168 | return (NULL); | ||
| 169 | } | ||
| 170 | |||
| 171 | int | 128 | int |
| 172 | dtls1_send_hello_verify_request(SSL *s) | 129 | dtls1_send_hello_verify_request(SSL *s) |
| 173 | { | 130 | { |
diff --git a/src/lib/libssl/ssl_methods.c b/src/lib/libssl/ssl_methods.c new file mode 100644 index 0000000000..3e9f18bc40 --- /dev/null +++ b/src/lib/libssl/ssl_methods.c | |||
| @@ -0,0 +1,666 @@ | |||
| 1 | /* $OpenBSD: ssl_methods.c,v 1.1 2018/11/05 05:45:15 jsing Exp $ */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include "ssl_locl.h" | ||
| 60 | |||
| 61 | static const SSL_METHOD_INTERNAL DTLSv1_client_method_internal_data = { | ||
| 62 | .version = DTLS1_VERSION, | ||
| 63 | .min_version = DTLS1_VERSION, | ||
| 64 | .max_version = DTLS1_VERSION, | ||
| 65 | .ssl_new = dtls1_new, | ||
| 66 | .ssl_clear = dtls1_clear, | ||
| 67 | .ssl_free = dtls1_free, | ||
| 68 | .ssl_accept = ssl_undefined_function, | ||
| 69 | .ssl_connect = ssl3_connect, | ||
| 70 | .get_ssl_method = dtls1_get_client_method, | ||
| 71 | .get_timeout = dtls1_default_timeout, | ||
| 72 | .ssl_version = ssl_undefined_void_function, | ||
| 73 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 74 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 75 | .ssl_get_message = dtls1_get_message, | ||
| 76 | .ssl_read_bytes = dtls1_read_bytes, | ||
| 77 | .ssl_write_bytes = dtls1_write_app_data_bytes, | ||
| 78 | .ssl3_enc = &DTLSv1_enc_data, | ||
| 79 | }; | ||
| 80 | |||
| 81 | static const SSL_METHOD DTLSv1_client_method_data = { | ||
| 82 | .ssl_dispatch_alert = dtls1_dispatch_alert, | ||
| 83 | .num_ciphers = ssl3_num_ciphers, | ||
| 84 | .get_cipher = dtls1_get_cipher, | ||
| 85 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 86 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 87 | .internal = &DTLSv1_client_method_internal_data, | ||
| 88 | }; | ||
| 89 | |||
| 90 | const SSL_METHOD * | ||
| 91 | DTLSv1_client_method(void) | ||
| 92 | { | ||
| 93 | return &DTLSv1_client_method_data; | ||
| 94 | } | ||
| 95 | |||
| 96 | const SSL_METHOD * | ||
| 97 | dtls1_get_client_method(int ver) | ||
| 98 | { | ||
| 99 | if (ver == DTLS1_VERSION) | ||
| 100 | return (DTLSv1_client_method()); | ||
| 101 | return (NULL); | ||
| 102 | } | ||
| 103 | |||
| 104 | static const SSL_METHOD *dtls1_get_method(int ver); | ||
| 105 | |||
| 106 | static const SSL_METHOD_INTERNAL DTLSv1_method_internal_data = { | ||
| 107 | .version = DTLS1_VERSION, | ||
| 108 | .min_version = DTLS1_VERSION, | ||
| 109 | .max_version = DTLS1_VERSION, | ||
| 110 | .ssl_new = dtls1_new, | ||
| 111 | .ssl_clear = dtls1_clear, | ||
| 112 | .ssl_free = dtls1_free, | ||
| 113 | .ssl_accept = ssl3_accept, | ||
| 114 | .ssl_connect = ssl3_connect, | ||
| 115 | .get_ssl_method = dtls1_get_method, | ||
| 116 | .get_timeout = dtls1_default_timeout, | ||
| 117 | .ssl_version = ssl_undefined_void_function, | ||
| 118 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 119 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 120 | .ssl_get_message = dtls1_get_message, | ||
| 121 | .ssl_read_bytes = dtls1_read_bytes, | ||
| 122 | .ssl_write_bytes = dtls1_write_app_data_bytes, | ||
| 123 | .ssl3_enc = &DTLSv1_enc_data, | ||
| 124 | }; | ||
| 125 | |||
| 126 | static const SSL_METHOD DTLSv1_method_data = { | ||
| 127 | .ssl_dispatch_alert = dtls1_dispatch_alert, | ||
| 128 | .num_ciphers = ssl3_num_ciphers, | ||
| 129 | .get_cipher = dtls1_get_cipher, | ||
| 130 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 131 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 132 | .internal = &DTLSv1_method_internal_data, | ||
| 133 | }; | ||
| 134 | |||
| 135 | const SSL_METHOD * | ||
| 136 | DTLSv1_method(void) | ||
| 137 | { | ||
| 138 | return &DTLSv1_method_data; | ||
| 139 | } | ||
| 140 | |||
| 141 | static const SSL_METHOD * | ||
| 142 | dtls1_get_method(int ver) | ||
| 143 | { | ||
| 144 | if (ver == DTLS1_VERSION) | ||
| 145 | return (DTLSv1_method()); | ||
| 146 | return (NULL); | ||
| 147 | } | ||
| 148 | |||
| 149 | static const SSL_METHOD_INTERNAL DTLSv1_server_method_internal_data = { | ||
| 150 | .version = DTLS1_VERSION, | ||
| 151 | .min_version = DTLS1_VERSION, | ||
| 152 | .max_version = DTLS1_VERSION, | ||
| 153 | .ssl_new = dtls1_new, | ||
| 154 | .ssl_clear = dtls1_clear, | ||
| 155 | .ssl_free = dtls1_free, | ||
| 156 | .ssl_accept = ssl3_accept, | ||
| 157 | .ssl_connect = ssl_undefined_function, | ||
| 158 | .get_ssl_method = dtls1_get_server_method, | ||
| 159 | .get_timeout = dtls1_default_timeout, | ||
| 160 | .ssl_version = ssl_undefined_void_function, | ||
| 161 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 162 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 163 | .ssl_get_message = dtls1_get_message, | ||
| 164 | .ssl_read_bytes = dtls1_read_bytes, | ||
| 165 | .ssl_write_bytes = dtls1_write_app_data_bytes, | ||
| 166 | .ssl3_enc = &DTLSv1_enc_data, | ||
| 167 | }; | ||
| 168 | |||
| 169 | static const SSL_METHOD DTLSv1_server_method_data = { | ||
| 170 | .ssl_dispatch_alert = dtls1_dispatch_alert, | ||
| 171 | .num_ciphers = ssl3_num_ciphers, | ||
| 172 | .get_cipher = dtls1_get_cipher, | ||
| 173 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 174 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 175 | .internal = &DTLSv1_server_method_internal_data, | ||
| 176 | }; | ||
| 177 | |||
| 178 | const SSL_METHOD * | ||
| 179 | DTLSv1_server_method(void) | ||
| 180 | { | ||
| 181 | return &DTLSv1_server_method_data; | ||
| 182 | } | ||
| 183 | |||
| 184 | const SSL_METHOD * | ||
| 185 | dtls1_get_server_method(int ver) | ||
| 186 | { | ||
| 187 | if (ver == DTLS1_VERSION) | ||
| 188 | return (DTLSv1_server_method()); | ||
| 189 | return (NULL); | ||
| 190 | } | ||
| 191 | |||
| 192 | static const SSL_METHOD_INTERNAL TLS_client_method_internal_data = { | ||
| 193 | .version = TLS1_2_VERSION, | ||
| 194 | .min_version = TLS1_VERSION, | ||
| 195 | .max_version = TLS1_2_VERSION, | ||
| 196 | .ssl_new = tls1_new, | ||
| 197 | .ssl_clear = tls1_clear, | ||
| 198 | .ssl_free = tls1_free, | ||
| 199 | .ssl_accept = ssl_undefined_function, | ||
| 200 | .ssl_connect = ssl3_connect, | ||
| 201 | .get_ssl_method = tls1_get_client_method, | ||
| 202 | .get_timeout = tls1_default_timeout, | ||
| 203 | .ssl_version = ssl_undefined_void_function, | ||
| 204 | .ssl_renegotiate = ssl_undefined_function, | ||
| 205 | .ssl_renegotiate_check = ssl_ok, | ||
| 206 | .ssl_get_message = ssl3_get_message, | ||
| 207 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 208 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 209 | .ssl3_enc = &TLSv1_2_enc_data, | ||
| 210 | }; | ||
| 211 | |||
| 212 | static const SSL_METHOD TLS_client_method_data = { | ||
| 213 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 214 | .num_ciphers = ssl3_num_ciphers, | ||
| 215 | .get_cipher = ssl3_get_cipher, | ||
| 216 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 217 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 218 | .internal = &TLS_client_method_internal_data, | ||
| 219 | }; | ||
| 220 | |||
| 221 | static const SSL_METHOD_INTERNAL TLSv1_client_method_internal_data = { | ||
| 222 | .version = TLS1_VERSION, | ||
| 223 | .min_version = TLS1_VERSION, | ||
| 224 | .max_version = TLS1_VERSION, | ||
| 225 | .ssl_new = tls1_new, | ||
| 226 | .ssl_clear = tls1_clear, | ||
| 227 | .ssl_free = tls1_free, | ||
| 228 | .ssl_accept = ssl_undefined_function, | ||
| 229 | .ssl_connect = ssl3_connect, | ||
| 230 | .get_ssl_method = tls1_get_client_method, | ||
| 231 | .get_timeout = tls1_default_timeout, | ||
| 232 | .ssl_version = ssl_undefined_void_function, | ||
| 233 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 234 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 235 | .ssl_get_message = ssl3_get_message, | ||
| 236 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 237 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 238 | .ssl3_enc = &TLSv1_enc_data, | ||
| 239 | }; | ||
| 240 | |||
| 241 | static const SSL_METHOD TLSv1_client_method_data = { | ||
| 242 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 243 | .num_ciphers = ssl3_num_ciphers, | ||
| 244 | .get_cipher = ssl3_get_cipher, | ||
| 245 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 246 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 247 | .internal = &TLSv1_client_method_internal_data, | ||
| 248 | }; | ||
| 249 | |||
| 250 | static const SSL_METHOD_INTERNAL TLSv1_1_client_method_internal_data = { | ||
| 251 | .version = TLS1_1_VERSION, | ||
| 252 | .min_version = TLS1_1_VERSION, | ||
| 253 | .max_version = TLS1_1_VERSION, | ||
| 254 | .ssl_new = tls1_new, | ||
| 255 | .ssl_clear = tls1_clear, | ||
| 256 | .ssl_free = tls1_free, | ||
| 257 | .ssl_accept = ssl_undefined_function, | ||
| 258 | .ssl_connect = ssl3_connect, | ||
| 259 | .get_ssl_method = tls1_get_client_method, | ||
| 260 | .get_timeout = tls1_default_timeout, | ||
| 261 | .ssl_version = ssl_undefined_void_function, | ||
| 262 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 263 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 264 | .ssl_get_message = ssl3_get_message, | ||
| 265 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 266 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 267 | .ssl3_enc = &TLSv1_1_enc_data, | ||
| 268 | }; | ||
| 269 | |||
| 270 | static const SSL_METHOD TLSv1_1_client_method_data = { | ||
| 271 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 272 | .num_ciphers = ssl3_num_ciphers, | ||
| 273 | .get_cipher = ssl3_get_cipher, | ||
| 274 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 275 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 276 | .internal = &TLSv1_1_client_method_internal_data, | ||
| 277 | }; | ||
| 278 | |||
| 279 | static const SSL_METHOD_INTERNAL TLSv1_2_client_method_internal_data = { | ||
| 280 | .version = TLS1_2_VERSION, | ||
| 281 | .min_version = TLS1_2_VERSION, | ||
| 282 | .max_version = TLS1_2_VERSION, | ||
| 283 | .ssl_new = tls1_new, | ||
| 284 | .ssl_clear = tls1_clear, | ||
| 285 | .ssl_free = tls1_free, | ||
| 286 | .ssl_accept = ssl_undefined_function, | ||
| 287 | .ssl_connect = ssl3_connect, | ||
| 288 | .get_ssl_method = tls1_get_client_method, | ||
| 289 | .get_timeout = tls1_default_timeout, | ||
| 290 | .ssl_version = ssl_undefined_void_function, | ||
| 291 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 292 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 293 | .ssl_get_message = ssl3_get_message, | ||
| 294 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 295 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 296 | .ssl3_enc = &TLSv1_2_enc_data, | ||
| 297 | }; | ||
| 298 | |||
| 299 | static const SSL_METHOD TLSv1_2_client_method_data = { | ||
| 300 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 301 | .num_ciphers = ssl3_num_ciphers, | ||
| 302 | .get_cipher = ssl3_get_cipher, | ||
| 303 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 304 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 305 | .internal = &TLSv1_2_client_method_internal_data, | ||
| 306 | }; | ||
| 307 | |||
| 308 | const SSL_METHOD * | ||
| 309 | tls1_get_client_method(int ver) | ||
| 310 | { | ||
| 311 | if (ver == TLS1_2_VERSION) | ||
| 312 | return (TLSv1_2_client_method()); | ||
| 313 | if (ver == TLS1_1_VERSION) | ||
| 314 | return (TLSv1_1_client_method()); | ||
| 315 | if (ver == TLS1_VERSION) | ||
| 316 | return (TLSv1_client_method()); | ||
| 317 | return (NULL); | ||
| 318 | } | ||
| 319 | |||
| 320 | const SSL_METHOD * | ||
| 321 | SSLv23_client_method(void) | ||
| 322 | { | ||
| 323 | return (TLS_client_method()); | ||
| 324 | } | ||
| 325 | |||
| 326 | const SSL_METHOD * | ||
| 327 | TLS_client_method(void) | ||
| 328 | { | ||
| 329 | return (&TLS_client_method_data); | ||
| 330 | } | ||
| 331 | |||
| 332 | const SSL_METHOD * | ||
| 333 | TLSv1_client_method(void) | ||
| 334 | { | ||
| 335 | return (&TLSv1_client_method_data); | ||
| 336 | } | ||
| 337 | |||
| 338 | const SSL_METHOD * | ||
| 339 | TLSv1_1_client_method(void) | ||
| 340 | { | ||
| 341 | return (&TLSv1_1_client_method_data); | ||
| 342 | } | ||
| 343 | |||
| 344 | const SSL_METHOD * | ||
| 345 | TLSv1_2_client_method(void) | ||
| 346 | { | ||
| 347 | return (&TLSv1_2_client_method_data); | ||
| 348 | } | ||
| 349 | |||
| 350 | static const SSL_METHOD *tls1_get_method(int ver); | ||
| 351 | |||
| 352 | static const SSL_METHOD_INTERNAL TLS_method_internal_data = { | ||
| 353 | .version = TLS1_2_VERSION, | ||
| 354 | .min_version = TLS1_VERSION, | ||
| 355 | .max_version = TLS1_2_VERSION, | ||
| 356 | .ssl_new = tls1_new, | ||
| 357 | .ssl_clear = tls1_clear, | ||
| 358 | .ssl_free = tls1_free, | ||
| 359 | .ssl_accept = ssl3_accept, | ||
| 360 | .ssl_connect = ssl3_connect, | ||
| 361 | .get_ssl_method = tls1_get_method, | ||
| 362 | .get_timeout = tls1_default_timeout, | ||
| 363 | .ssl_version = ssl_undefined_void_function, | ||
| 364 | .ssl_renegotiate = ssl_undefined_function, | ||
| 365 | .ssl_renegotiate_check = ssl_ok, | ||
| 366 | .ssl_get_message = ssl3_get_message, | ||
| 367 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 368 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 369 | .ssl3_enc = &TLSv1_2_enc_data, | ||
| 370 | }; | ||
| 371 | |||
| 372 | static const SSL_METHOD TLS_method_data = { | ||
| 373 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 374 | .num_ciphers = ssl3_num_ciphers, | ||
| 375 | .get_cipher = ssl3_get_cipher, | ||
| 376 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 377 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 378 | .internal = &TLS_method_internal_data, | ||
| 379 | }; | ||
| 380 | |||
| 381 | static const SSL_METHOD_INTERNAL TLSv1_method_internal_data = { | ||
| 382 | .version = TLS1_VERSION, | ||
| 383 | .min_version = TLS1_VERSION, | ||
| 384 | .max_version = TLS1_VERSION, | ||
| 385 | .ssl_new = tls1_new, | ||
| 386 | .ssl_clear = tls1_clear, | ||
| 387 | .ssl_free = tls1_free, | ||
| 388 | .ssl_accept = ssl3_accept, | ||
| 389 | .ssl_connect = ssl3_connect, | ||
| 390 | .get_ssl_method = tls1_get_method, | ||
| 391 | .get_timeout = tls1_default_timeout, | ||
| 392 | .ssl_version = ssl_undefined_void_function, | ||
| 393 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 394 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 395 | .ssl_get_message = ssl3_get_message, | ||
| 396 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 397 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 398 | .ssl3_enc = &TLSv1_enc_data, | ||
| 399 | }; | ||
| 400 | |||
| 401 | static const SSL_METHOD TLSv1_method_data = { | ||
| 402 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 403 | .num_ciphers = ssl3_num_ciphers, | ||
| 404 | .get_cipher = ssl3_get_cipher, | ||
| 405 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 406 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 407 | .internal = &TLSv1_method_internal_data, | ||
| 408 | }; | ||
| 409 | |||
| 410 | static const SSL_METHOD_INTERNAL TLSv1_1_method_internal_data = { | ||
| 411 | .version = TLS1_1_VERSION, | ||
| 412 | .min_version = TLS1_1_VERSION, | ||
| 413 | .max_version = TLS1_1_VERSION, | ||
| 414 | .ssl_new = tls1_new, | ||
| 415 | .ssl_clear = tls1_clear, | ||
| 416 | .ssl_free = tls1_free, | ||
| 417 | .ssl_accept = ssl3_accept, | ||
| 418 | .ssl_connect = ssl3_connect, | ||
| 419 | .get_ssl_method = tls1_get_method, | ||
| 420 | .get_timeout = tls1_default_timeout, | ||
| 421 | .ssl_version = ssl_undefined_void_function, | ||
| 422 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 423 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 424 | .ssl_get_message = ssl3_get_message, | ||
| 425 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 426 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 427 | .ssl3_enc = &TLSv1_1_enc_data, | ||
| 428 | }; | ||
| 429 | |||
| 430 | static const SSL_METHOD TLSv1_1_method_data = { | ||
| 431 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 432 | .num_ciphers = ssl3_num_ciphers, | ||
| 433 | .get_cipher = ssl3_get_cipher, | ||
| 434 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 435 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 436 | .internal = &TLSv1_1_method_internal_data, | ||
| 437 | }; | ||
| 438 | |||
| 439 | static const SSL_METHOD_INTERNAL TLSv1_2_method_internal_data = { | ||
| 440 | .version = TLS1_2_VERSION, | ||
| 441 | .min_version = TLS1_2_VERSION, | ||
| 442 | .max_version = TLS1_2_VERSION, | ||
| 443 | .ssl_new = tls1_new, | ||
| 444 | .ssl_clear = tls1_clear, | ||
| 445 | .ssl_free = tls1_free, | ||
| 446 | .ssl_accept = ssl3_accept, | ||
| 447 | .ssl_connect = ssl3_connect, | ||
| 448 | .get_ssl_method = tls1_get_method, | ||
| 449 | .get_timeout = tls1_default_timeout, | ||
| 450 | .ssl_version = ssl_undefined_void_function, | ||
| 451 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 452 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 453 | .ssl_get_message = ssl3_get_message, | ||
| 454 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 455 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 456 | .ssl3_enc = &TLSv1_2_enc_data, | ||
| 457 | }; | ||
| 458 | |||
| 459 | static const SSL_METHOD TLSv1_2_method_data = { | ||
| 460 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 461 | .num_ciphers = ssl3_num_ciphers, | ||
| 462 | .get_cipher = ssl3_get_cipher, | ||
| 463 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 464 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 465 | .internal = &TLSv1_2_method_internal_data, | ||
| 466 | }; | ||
| 467 | |||
| 468 | static const SSL_METHOD * | ||
| 469 | tls1_get_method(int ver) | ||
| 470 | { | ||
| 471 | if (ver == TLS1_2_VERSION) | ||
| 472 | return (TLSv1_2_method()); | ||
| 473 | if (ver == TLS1_1_VERSION) | ||
| 474 | return (TLSv1_1_method()); | ||
| 475 | if (ver == TLS1_VERSION) | ||
| 476 | return (TLSv1_method()); | ||
| 477 | return (NULL); | ||
| 478 | } | ||
| 479 | |||
| 480 | const SSL_METHOD * | ||
| 481 | SSLv23_method(void) | ||
| 482 | { | ||
| 483 | return (TLS_method()); | ||
| 484 | } | ||
| 485 | |||
| 486 | const SSL_METHOD * | ||
| 487 | TLS_method(void) | ||
| 488 | { | ||
| 489 | return &TLS_method_data; | ||
| 490 | } | ||
| 491 | |||
| 492 | const SSL_METHOD * | ||
| 493 | TLSv1_method(void) | ||
| 494 | { | ||
| 495 | return (&TLSv1_method_data); | ||
| 496 | } | ||
| 497 | |||
| 498 | const SSL_METHOD * | ||
| 499 | TLSv1_1_method(void) | ||
| 500 | { | ||
| 501 | return (&TLSv1_1_method_data); | ||
| 502 | } | ||
| 503 | |||
| 504 | const SSL_METHOD * | ||
| 505 | TLSv1_2_method(void) | ||
| 506 | { | ||
| 507 | return (&TLSv1_2_method_data); | ||
| 508 | } | ||
| 509 | |||
| 510 | static const SSL_METHOD_INTERNAL TLS_server_method_internal_data = { | ||
| 511 | .version = TLS1_2_VERSION, | ||
| 512 | .min_version = TLS1_VERSION, | ||
| 513 | .max_version = TLS1_2_VERSION, | ||
| 514 | .ssl_new = tls1_new, | ||
| 515 | .ssl_clear = tls1_clear, | ||
| 516 | .ssl_free = tls1_free, | ||
| 517 | .ssl_accept = ssl3_accept, | ||
| 518 | .ssl_connect = ssl_undefined_function, | ||
| 519 | .get_ssl_method = tls1_get_server_method, | ||
| 520 | .get_timeout = tls1_default_timeout, | ||
| 521 | .ssl_version = ssl_undefined_void_function, | ||
| 522 | .ssl_renegotiate = ssl_undefined_function, | ||
| 523 | .ssl_renegotiate_check = ssl_ok, | ||
| 524 | .ssl_get_message = ssl3_get_message, | ||
| 525 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 526 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 527 | .ssl3_enc = &TLSv1_2_enc_data, | ||
| 528 | }; | ||
| 529 | |||
| 530 | static const SSL_METHOD TLS_server_method_data = { | ||
| 531 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 532 | .num_ciphers = ssl3_num_ciphers, | ||
| 533 | .get_cipher = ssl3_get_cipher, | ||
| 534 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 535 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 536 | .internal = &TLS_server_method_internal_data, | ||
| 537 | }; | ||
| 538 | |||
| 539 | static const SSL_METHOD_INTERNAL TLSv1_server_method_internal_data = { | ||
| 540 | .version = TLS1_VERSION, | ||
| 541 | .min_version = TLS1_VERSION, | ||
| 542 | .max_version = TLS1_VERSION, | ||
| 543 | .ssl_new = tls1_new, | ||
| 544 | .ssl_clear = tls1_clear, | ||
| 545 | .ssl_free = tls1_free, | ||
| 546 | .ssl_accept = ssl3_accept, | ||
| 547 | .ssl_connect = ssl_undefined_function, | ||
| 548 | .get_ssl_method = tls1_get_server_method, | ||
| 549 | .get_timeout = tls1_default_timeout, | ||
| 550 | .ssl_version = ssl_undefined_void_function, | ||
| 551 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 552 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 553 | .ssl_get_message = ssl3_get_message, | ||
| 554 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 555 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 556 | .ssl3_enc = &TLSv1_enc_data, | ||
| 557 | }; | ||
| 558 | |||
| 559 | static const SSL_METHOD TLSv1_server_method_data = { | ||
| 560 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 561 | .num_ciphers = ssl3_num_ciphers, | ||
| 562 | .get_cipher = ssl3_get_cipher, | ||
| 563 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 564 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 565 | .internal = &TLSv1_server_method_internal_data, | ||
| 566 | }; | ||
| 567 | |||
| 568 | static const SSL_METHOD_INTERNAL TLSv1_1_server_method_internal_data = { | ||
| 569 | .version = TLS1_1_VERSION, | ||
| 570 | .min_version = TLS1_1_VERSION, | ||
| 571 | .max_version = TLS1_1_VERSION, | ||
| 572 | .ssl_new = tls1_new, | ||
| 573 | .ssl_clear = tls1_clear, | ||
| 574 | .ssl_free = tls1_free, | ||
| 575 | .ssl_accept = ssl3_accept, | ||
| 576 | .ssl_connect = ssl_undefined_function, | ||
| 577 | .get_ssl_method = tls1_get_server_method, | ||
| 578 | .get_timeout = tls1_default_timeout, | ||
| 579 | .ssl_version = ssl_undefined_void_function, | ||
| 580 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 581 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 582 | .ssl_get_message = ssl3_get_message, | ||
| 583 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 584 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 585 | .ssl3_enc = &TLSv1_1_enc_data, | ||
| 586 | }; | ||
| 587 | |||
| 588 | static const SSL_METHOD TLSv1_1_server_method_data = { | ||
| 589 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 590 | .num_ciphers = ssl3_num_ciphers, | ||
| 591 | .get_cipher = ssl3_get_cipher, | ||
| 592 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 593 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 594 | .internal = &TLSv1_1_server_method_internal_data, | ||
| 595 | }; | ||
| 596 | |||
| 597 | static const SSL_METHOD_INTERNAL TLSv1_2_server_method_internal_data = { | ||
| 598 | .version = TLS1_2_VERSION, | ||
| 599 | .min_version = TLS1_2_VERSION, | ||
| 600 | .max_version = TLS1_2_VERSION, | ||
| 601 | .ssl_new = tls1_new, | ||
| 602 | .ssl_clear = tls1_clear, | ||
| 603 | .ssl_free = tls1_free, | ||
| 604 | .ssl_accept = ssl3_accept, | ||
| 605 | .ssl_connect = ssl_undefined_function, | ||
| 606 | .get_ssl_method = tls1_get_server_method, | ||
| 607 | .get_timeout = tls1_default_timeout, | ||
| 608 | .ssl_version = ssl_undefined_void_function, | ||
| 609 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 610 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 611 | .ssl_get_message = ssl3_get_message, | ||
| 612 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 613 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 614 | .ssl3_enc = &TLSv1_2_enc_data, | ||
| 615 | }; | ||
| 616 | |||
| 617 | static const SSL_METHOD TLSv1_2_server_method_data = { | ||
| 618 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 619 | .num_ciphers = ssl3_num_ciphers, | ||
| 620 | .get_cipher = ssl3_get_cipher, | ||
| 621 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 622 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 623 | .internal = &TLSv1_2_server_method_internal_data, | ||
| 624 | }; | ||
| 625 | |||
| 626 | const SSL_METHOD * | ||
| 627 | tls1_get_server_method(int ver) | ||
| 628 | { | ||
| 629 | if (ver == TLS1_2_VERSION) | ||
| 630 | return (TLSv1_2_server_method()); | ||
| 631 | if (ver == TLS1_1_VERSION) | ||
| 632 | return (TLSv1_1_server_method()); | ||
| 633 | if (ver == TLS1_VERSION) | ||
| 634 | return (TLSv1_server_method()); | ||
| 635 | return (NULL); | ||
| 636 | } | ||
| 637 | |||
| 638 | const SSL_METHOD * | ||
| 639 | SSLv23_server_method(void) | ||
| 640 | { | ||
| 641 | return (TLS_server_method()); | ||
| 642 | } | ||
| 643 | |||
| 644 | const SSL_METHOD * | ||
| 645 | TLS_server_method(void) | ||
| 646 | { | ||
| 647 | return (&TLS_server_method_data); | ||
| 648 | } | ||
| 649 | |||
| 650 | const SSL_METHOD * | ||
| 651 | TLSv1_server_method(void) | ||
| 652 | { | ||
| 653 | return (&TLSv1_server_method_data); | ||
| 654 | } | ||
| 655 | |||
| 656 | const SSL_METHOD * | ||
| 657 | TLSv1_1_server_method(void) | ||
| 658 | { | ||
| 659 | return (&TLSv1_1_server_method_data); | ||
| 660 | } | ||
| 661 | |||
| 662 | const SSL_METHOD * | ||
| 663 | TLSv1_2_server_method(void) | ||
| 664 | { | ||
| 665 | return (&TLSv1_2_server_method_data); | ||
| 666 | } | ||
diff --git a/src/lib/libssl/t1_clnt.c b/src/lib/libssl/t1_clnt.c deleted file mode 100644 index 4e3b208743..0000000000 --- a/src/lib/libssl/t1_clnt.c +++ /dev/null | |||
| @@ -1,223 +0,0 @@ | |||
| 1 | /* $OpenBSD: t1_clnt.c,v 1.26 2018/08/30 16:56:16 jsing Exp $ */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | |||
| 61 | #include "ssl_locl.h" | ||
| 62 | |||
| 63 | #include <openssl/buffer.h> | ||
| 64 | #include <openssl/evp.h> | ||
| 65 | #include <openssl/objects.h> | ||
| 66 | |||
| 67 | static const SSL_METHOD_INTERNAL TLS_client_method_internal_data = { | ||
| 68 | .version = TLS1_2_VERSION, | ||
| 69 | .min_version = TLS1_VERSION, | ||
| 70 | .max_version = TLS1_2_VERSION, | ||
| 71 | .ssl_new = tls1_new, | ||
| 72 | .ssl_clear = tls1_clear, | ||
| 73 | .ssl_free = tls1_free, | ||
| 74 | .ssl_accept = ssl_undefined_function, | ||
| 75 | .ssl_connect = ssl3_connect, | ||
| 76 | .get_ssl_method = tls1_get_client_method, | ||
| 77 | .get_timeout = tls1_default_timeout, | ||
| 78 | .ssl_version = ssl_undefined_void_function, | ||
| 79 | .ssl_renegotiate = ssl_undefined_function, | ||
| 80 | .ssl_renegotiate_check = ssl_ok, | ||
| 81 | .ssl_get_message = ssl3_get_message, | ||
| 82 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 83 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 84 | .ssl3_enc = &TLSv1_2_enc_data, | ||
| 85 | }; | ||
| 86 | |||
| 87 | static const SSL_METHOD TLS_client_method_data = { | ||
| 88 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 89 | .num_ciphers = ssl3_num_ciphers, | ||
| 90 | .get_cipher = ssl3_get_cipher, | ||
| 91 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 92 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 93 | .internal = &TLS_client_method_internal_data, | ||
| 94 | }; | ||
| 95 | |||
| 96 | static const SSL_METHOD_INTERNAL TLSv1_client_method_internal_data = { | ||
| 97 | .version = TLS1_VERSION, | ||
| 98 | .min_version = TLS1_VERSION, | ||
| 99 | .max_version = TLS1_VERSION, | ||
| 100 | .ssl_new = tls1_new, | ||
| 101 | .ssl_clear = tls1_clear, | ||
| 102 | .ssl_free = tls1_free, | ||
| 103 | .ssl_accept = ssl_undefined_function, | ||
| 104 | .ssl_connect = ssl3_connect, | ||
| 105 | .get_ssl_method = tls1_get_client_method, | ||
| 106 | .get_timeout = tls1_default_timeout, | ||
| 107 | .ssl_version = ssl_undefined_void_function, | ||
| 108 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 109 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 110 | .ssl_get_message = ssl3_get_message, | ||
| 111 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 112 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 113 | .ssl3_enc = &TLSv1_enc_data, | ||
| 114 | }; | ||
| 115 | |||
| 116 | static const SSL_METHOD TLSv1_client_method_data = { | ||
| 117 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 118 | .num_ciphers = ssl3_num_ciphers, | ||
| 119 | .get_cipher = ssl3_get_cipher, | ||
| 120 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 121 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 122 | .internal = &TLSv1_client_method_internal_data, | ||
| 123 | }; | ||
| 124 | |||
| 125 | static const SSL_METHOD_INTERNAL TLSv1_1_client_method_internal_data = { | ||
| 126 | .version = TLS1_1_VERSION, | ||
| 127 | .min_version = TLS1_1_VERSION, | ||
| 128 | .max_version = TLS1_1_VERSION, | ||
| 129 | .ssl_new = tls1_new, | ||
| 130 | .ssl_clear = tls1_clear, | ||
| 131 | .ssl_free = tls1_free, | ||
| 132 | .ssl_accept = ssl_undefined_function, | ||
| 133 | .ssl_connect = ssl3_connect, | ||
| 134 | .get_ssl_method = tls1_get_client_method, | ||
| 135 | .get_timeout = tls1_default_timeout, | ||
| 136 | .ssl_version = ssl_undefined_void_function, | ||
| 137 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 138 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 139 | .ssl_get_message = ssl3_get_message, | ||
| 140 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 141 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 142 | .ssl3_enc = &TLSv1_1_enc_data, | ||
| 143 | }; | ||
| 144 | |||
| 145 | static const SSL_METHOD TLSv1_1_client_method_data = { | ||
| 146 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 147 | .num_ciphers = ssl3_num_ciphers, | ||
| 148 | .get_cipher = ssl3_get_cipher, | ||
| 149 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 150 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 151 | .internal = &TLSv1_1_client_method_internal_data, | ||
| 152 | }; | ||
| 153 | |||
| 154 | static const SSL_METHOD_INTERNAL TLSv1_2_client_method_internal_data = { | ||
| 155 | .version = TLS1_2_VERSION, | ||
| 156 | .min_version = TLS1_2_VERSION, | ||
| 157 | .max_version = TLS1_2_VERSION, | ||
| 158 | .ssl_new = tls1_new, | ||
| 159 | .ssl_clear = tls1_clear, | ||
| 160 | .ssl_free = tls1_free, | ||
| 161 | .ssl_accept = ssl_undefined_function, | ||
| 162 | .ssl_connect = ssl3_connect, | ||
| 163 | .get_ssl_method = tls1_get_client_method, | ||
| 164 | .get_timeout = tls1_default_timeout, | ||
| 165 | .ssl_version = ssl_undefined_void_function, | ||
| 166 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 167 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 168 | .ssl_get_message = ssl3_get_message, | ||
| 169 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 170 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 171 | .ssl3_enc = &TLSv1_2_enc_data, | ||
| 172 | }; | ||
| 173 | |||
| 174 | static const SSL_METHOD TLSv1_2_client_method_data = { | ||
| 175 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 176 | .num_ciphers = ssl3_num_ciphers, | ||
| 177 | .get_cipher = ssl3_get_cipher, | ||
| 178 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 179 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 180 | .internal = &TLSv1_2_client_method_internal_data, | ||
| 181 | }; | ||
| 182 | |||
| 183 | const SSL_METHOD * | ||
| 184 | tls1_get_client_method(int ver) | ||
| 185 | { | ||
| 186 | if (ver == TLS1_2_VERSION) | ||
| 187 | return (TLSv1_2_client_method()); | ||
| 188 | if (ver == TLS1_1_VERSION) | ||
| 189 | return (TLSv1_1_client_method()); | ||
| 190 | if (ver == TLS1_VERSION) | ||
| 191 | return (TLSv1_client_method()); | ||
| 192 | return (NULL); | ||
| 193 | } | ||
| 194 | |||
| 195 | const SSL_METHOD * | ||
| 196 | SSLv23_client_method(void) | ||
| 197 | { | ||
| 198 | return (TLS_client_method()); | ||
| 199 | } | ||
| 200 | |||
| 201 | const SSL_METHOD * | ||
| 202 | TLS_client_method(void) | ||
| 203 | { | ||
| 204 | return (&TLS_client_method_data); | ||
| 205 | } | ||
| 206 | |||
| 207 | const SSL_METHOD * | ||
| 208 | TLSv1_client_method(void) | ||
| 209 | { | ||
| 210 | return (&TLSv1_client_method_data); | ||
| 211 | } | ||
| 212 | |||
| 213 | const SSL_METHOD * | ||
| 214 | TLSv1_1_client_method(void) | ||
| 215 | { | ||
| 216 | return (&TLSv1_1_client_method_data); | ||
| 217 | } | ||
| 218 | |||
| 219 | const SSL_METHOD * | ||
| 220 | TLSv1_2_client_method(void) | ||
| 221 | { | ||
| 222 | return (&TLSv1_2_client_method_data); | ||
| 223 | } | ||
diff --git a/src/lib/libssl/t1_meth.c b/src/lib/libssl/t1_meth.c deleted file mode 100644 index 5ce8c9135b..0000000000 --- a/src/lib/libssl/t1_meth.c +++ /dev/null | |||
| @@ -1,223 +0,0 @@ | |||
| 1 | /* $OpenBSD: t1_meth.c,v 1.25 2018/08/30 16:56:16 jsing Exp $ */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | |||
| 61 | #include <openssl/objects.h> | ||
| 62 | |||
| 63 | #include "ssl_locl.h" | ||
| 64 | |||
| 65 | static const SSL_METHOD *tls1_get_method(int ver); | ||
| 66 | |||
| 67 | static const SSL_METHOD_INTERNAL TLS_method_internal_data = { | ||
| 68 | .version = TLS1_2_VERSION, | ||
| 69 | .min_version = TLS1_VERSION, | ||
| 70 | .max_version = TLS1_2_VERSION, | ||
| 71 | .ssl_new = tls1_new, | ||
| 72 | .ssl_clear = tls1_clear, | ||
| 73 | .ssl_free = tls1_free, | ||
| 74 | .ssl_accept = ssl3_accept, | ||
| 75 | .ssl_connect = ssl3_connect, | ||
| 76 | .get_ssl_method = tls1_get_method, | ||
| 77 | .get_timeout = tls1_default_timeout, | ||
| 78 | .ssl_version = ssl_undefined_void_function, | ||
| 79 | .ssl_renegotiate = ssl_undefined_function, | ||
| 80 | .ssl_renegotiate_check = ssl_ok, | ||
| 81 | .ssl_get_message = ssl3_get_message, | ||
| 82 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 83 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 84 | .ssl3_enc = &TLSv1_2_enc_data, | ||
| 85 | }; | ||
| 86 | |||
| 87 | static const SSL_METHOD TLS_method_data = { | ||
| 88 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 89 | .num_ciphers = ssl3_num_ciphers, | ||
| 90 | .get_cipher = ssl3_get_cipher, | ||
| 91 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 92 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 93 | .internal = &TLS_method_internal_data, | ||
| 94 | }; | ||
| 95 | |||
| 96 | static const SSL_METHOD_INTERNAL TLSv1_method_internal_data = { | ||
| 97 | .version = TLS1_VERSION, | ||
| 98 | .min_version = TLS1_VERSION, | ||
| 99 | .max_version = TLS1_VERSION, | ||
| 100 | .ssl_new = tls1_new, | ||
| 101 | .ssl_clear = tls1_clear, | ||
| 102 | .ssl_free = tls1_free, | ||
| 103 | .ssl_accept = ssl3_accept, | ||
| 104 | .ssl_connect = ssl3_connect, | ||
| 105 | .get_ssl_method = tls1_get_method, | ||
| 106 | .get_timeout = tls1_default_timeout, | ||
| 107 | .ssl_version = ssl_undefined_void_function, | ||
| 108 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 109 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 110 | .ssl_get_message = ssl3_get_message, | ||
| 111 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 112 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 113 | .ssl3_enc = &TLSv1_enc_data, | ||
| 114 | }; | ||
| 115 | |||
| 116 | static const SSL_METHOD TLSv1_method_data = { | ||
| 117 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 118 | .num_ciphers = ssl3_num_ciphers, | ||
| 119 | .get_cipher = ssl3_get_cipher, | ||
| 120 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 121 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 122 | .internal = &TLSv1_method_internal_data, | ||
| 123 | }; | ||
| 124 | |||
| 125 | static const SSL_METHOD_INTERNAL TLSv1_1_method_internal_data = { | ||
| 126 | .version = TLS1_1_VERSION, | ||
| 127 | .min_version = TLS1_1_VERSION, | ||
| 128 | .max_version = TLS1_1_VERSION, | ||
| 129 | .ssl_new = tls1_new, | ||
| 130 | .ssl_clear = tls1_clear, | ||
| 131 | .ssl_free = tls1_free, | ||
| 132 | .ssl_accept = ssl3_accept, | ||
| 133 | .ssl_connect = ssl3_connect, | ||
| 134 | .get_ssl_method = tls1_get_method, | ||
| 135 | .get_timeout = tls1_default_timeout, | ||
| 136 | .ssl_version = ssl_undefined_void_function, | ||
| 137 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 138 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 139 | .ssl_get_message = ssl3_get_message, | ||
| 140 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 141 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 142 | .ssl3_enc = &TLSv1_1_enc_data, | ||
| 143 | }; | ||
| 144 | |||
| 145 | static const SSL_METHOD TLSv1_1_method_data = { | ||
| 146 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 147 | .num_ciphers = ssl3_num_ciphers, | ||
| 148 | .get_cipher = ssl3_get_cipher, | ||
| 149 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 150 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 151 | .internal = &TLSv1_1_method_internal_data, | ||
| 152 | }; | ||
| 153 | |||
| 154 | static const SSL_METHOD_INTERNAL TLSv1_2_method_internal_data = { | ||
| 155 | .version = TLS1_2_VERSION, | ||
| 156 | .min_version = TLS1_2_VERSION, | ||
| 157 | .max_version = TLS1_2_VERSION, | ||
| 158 | .ssl_new = tls1_new, | ||
| 159 | .ssl_clear = tls1_clear, | ||
| 160 | .ssl_free = tls1_free, | ||
| 161 | .ssl_accept = ssl3_accept, | ||
| 162 | .ssl_connect = ssl3_connect, | ||
| 163 | .get_ssl_method = tls1_get_method, | ||
| 164 | .get_timeout = tls1_default_timeout, | ||
| 165 | .ssl_version = ssl_undefined_void_function, | ||
| 166 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 167 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 168 | .ssl_get_message = ssl3_get_message, | ||
| 169 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 170 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 171 | .ssl3_enc = &TLSv1_2_enc_data, | ||
| 172 | }; | ||
| 173 | |||
| 174 | static const SSL_METHOD TLSv1_2_method_data = { | ||
| 175 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 176 | .num_ciphers = ssl3_num_ciphers, | ||
| 177 | .get_cipher = ssl3_get_cipher, | ||
| 178 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 179 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 180 | .internal = &TLSv1_2_method_internal_data, | ||
| 181 | }; | ||
| 182 | |||
| 183 | static const SSL_METHOD * | ||
| 184 | tls1_get_method(int ver) | ||
| 185 | { | ||
| 186 | if (ver == TLS1_2_VERSION) | ||
| 187 | return (TLSv1_2_method()); | ||
| 188 | if (ver == TLS1_1_VERSION) | ||
| 189 | return (TLSv1_1_method()); | ||
| 190 | if (ver == TLS1_VERSION) | ||
| 191 | return (TLSv1_method()); | ||
| 192 | return (NULL); | ||
| 193 | } | ||
| 194 | |||
| 195 | const SSL_METHOD * | ||
| 196 | SSLv23_method(void) | ||
| 197 | { | ||
| 198 | return (TLS_method()); | ||
| 199 | } | ||
| 200 | |||
| 201 | const SSL_METHOD * | ||
| 202 | TLS_method(void) | ||
| 203 | { | ||
| 204 | return &TLS_method_data; | ||
| 205 | } | ||
| 206 | |||
| 207 | const SSL_METHOD * | ||
| 208 | TLSv1_method(void) | ||
| 209 | { | ||
| 210 | return (&TLSv1_method_data); | ||
| 211 | } | ||
| 212 | |||
| 213 | const SSL_METHOD * | ||
| 214 | TLSv1_1_method(void) | ||
| 215 | { | ||
| 216 | return (&TLSv1_1_method_data); | ||
| 217 | } | ||
| 218 | |||
| 219 | const SSL_METHOD * | ||
| 220 | TLSv1_2_method(void) | ||
| 221 | { | ||
| 222 | return (&TLSv1_2_method_data); | ||
| 223 | } | ||
diff --git a/src/lib/libssl/t1_srvr.c b/src/lib/libssl/t1_srvr.c deleted file mode 100644 index 02c5cf46ae..0000000000 --- a/src/lib/libssl/t1_srvr.c +++ /dev/null | |||
| @@ -1,224 +0,0 @@ | |||
| 1 | /* $OpenBSD: t1_srvr.c,v 1.27 2018/08/30 16:56:16 jsing Exp $ */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | |||
| 61 | #include "ssl_locl.h" | ||
| 62 | |||
| 63 | #include <openssl/buffer.h> | ||
| 64 | #include <openssl/evp.h> | ||
| 65 | #include <openssl/objects.h> | ||
| 66 | #include <openssl/x509.h> | ||
| 67 | |||
| 68 | static const SSL_METHOD_INTERNAL TLS_server_method_internal_data = { | ||
| 69 | .version = TLS1_2_VERSION, | ||
| 70 | .min_version = TLS1_VERSION, | ||
| 71 | .max_version = TLS1_2_VERSION, | ||
| 72 | .ssl_new = tls1_new, | ||
| 73 | .ssl_clear = tls1_clear, | ||
| 74 | .ssl_free = tls1_free, | ||
| 75 | .ssl_accept = ssl3_accept, | ||
| 76 | .ssl_connect = ssl_undefined_function, | ||
| 77 | .get_ssl_method = tls1_get_server_method, | ||
| 78 | .get_timeout = tls1_default_timeout, | ||
| 79 | .ssl_version = ssl_undefined_void_function, | ||
| 80 | .ssl_renegotiate = ssl_undefined_function, | ||
| 81 | .ssl_renegotiate_check = ssl_ok, | ||
| 82 | .ssl_get_message = ssl3_get_message, | ||
| 83 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 84 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 85 | .ssl3_enc = &TLSv1_2_enc_data, | ||
| 86 | }; | ||
| 87 | |||
| 88 | static const SSL_METHOD TLS_server_method_data = { | ||
| 89 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 90 | .num_ciphers = ssl3_num_ciphers, | ||
| 91 | .get_cipher = ssl3_get_cipher, | ||
| 92 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 93 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 94 | .internal = &TLS_server_method_internal_data, | ||
| 95 | }; | ||
| 96 | |||
| 97 | static const SSL_METHOD_INTERNAL TLSv1_server_method_internal_data = { | ||
| 98 | .version = TLS1_VERSION, | ||
| 99 | .min_version = TLS1_VERSION, | ||
| 100 | .max_version = TLS1_VERSION, | ||
| 101 | .ssl_new = tls1_new, | ||
| 102 | .ssl_clear = tls1_clear, | ||
| 103 | .ssl_free = tls1_free, | ||
| 104 | .ssl_accept = ssl3_accept, | ||
| 105 | .ssl_connect = ssl_undefined_function, | ||
| 106 | .get_ssl_method = tls1_get_server_method, | ||
| 107 | .get_timeout = tls1_default_timeout, | ||
| 108 | .ssl_version = ssl_undefined_void_function, | ||
| 109 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 110 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 111 | .ssl_get_message = ssl3_get_message, | ||
| 112 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 113 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 114 | .ssl3_enc = &TLSv1_enc_data, | ||
| 115 | }; | ||
| 116 | |||
| 117 | static const SSL_METHOD TLSv1_server_method_data = { | ||
| 118 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 119 | .num_ciphers = ssl3_num_ciphers, | ||
| 120 | .get_cipher = ssl3_get_cipher, | ||
| 121 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 122 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 123 | .internal = &TLSv1_server_method_internal_data, | ||
| 124 | }; | ||
| 125 | |||
| 126 | static const SSL_METHOD_INTERNAL TLSv1_1_server_method_internal_data = { | ||
| 127 | .version = TLS1_1_VERSION, | ||
| 128 | .min_version = TLS1_1_VERSION, | ||
| 129 | .max_version = TLS1_1_VERSION, | ||
| 130 | .ssl_new = tls1_new, | ||
| 131 | .ssl_clear = tls1_clear, | ||
| 132 | .ssl_free = tls1_free, | ||
| 133 | .ssl_accept = ssl3_accept, | ||
| 134 | .ssl_connect = ssl_undefined_function, | ||
| 135 | .get_ssl_method = tls1_get_server_method, | ||
| 136 | .get_timeout = tls1_default_timeout, | ||
| 137 | .ssl_version = ssl_undefined_void_function, | ||
| 138 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 139 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 140 | .ssl_get_message = ssl3_get_message, | ||
| 141 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 142 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 143 | .ssl3_enc = &TLSv1_1_enc_data, | ||
| 144 | }; | ||
| 145 | |||
| 146 | static const SSL_METHOD TLSv1_1_server_method_data = { | ||
| 147 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 148 | .num_ciphers = ssl3_num_ciphers, | ||
| 149 | .get_cipher = ssl3_get_cipher, | ||
| 150 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 151 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 152 | .internal = &TLSv1_1_server_method_internal_data, | ||
| 153 | }; | ||
| 154 | |||
| 155 | static const SSL_METHOD_INTERNAL TLSv1_2_server_method_internal_data = { | ||
| 156 | .version = TLS1_2_VERSION, | ||
| 157 | .min_version = TLS1_2_VERSION, | ||
| 158 | .max_version = TLS1_2_VERSION, | ||
| 159 | .ssl_new = tls1_new, | ||
| 160 | .ssl_clear = tls1_clear, | ||
| 161 | .ssl_free = tls1_free, | ||
| 162 | .ssl_accept = ssl3_accept, | ||
| 163 | .ssl_connect = ssl_undefined_function, | ||
| 164 | .get_ssl_method = tls1_get_server_method, | ||
| 165 | .get_timeout = tls1_default_timeout, | ||
| 166 | .ssl_version = ssl_undefined_void_function, | ||
| 167 | .ssl_renegotiate = ssl3_renegotiate, | ||
| 168 | .ssl_renegotiate_check = ssl3_renegotiate_check, | ||
| 169 | .ssl_get_message = ssl3_get_message, | ||
| 170 | .ssl_read_bytes = ssl3_read_bytes, | ||
| 171 | .ssl_write_bytes = ssl3_write_bytes, | ||
| 172 | .ssl3_enc = &TLSv1_2_enc_data, | ||
| 173 | }; | ||
| 174 | |||
| 175 | static const SSL_METHOD TLSv1_2_server_method_data = { | ||
| 176 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
| 177 | .num_ciphers = ssl3_num_ciphers, | ||
| 178 | .get_cipher = ssl3_get_cipher, | ||
| 179 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
| 180 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
| 181 | .internal = &TLSv1_2_server_method_internal_data, | ||
| 182 | }; | ||
| 183 | |||
| 184 | const SSL_METHOD * | ||
| 185 | tls1_get_server_method(int ver) | ||
| 186 | { | ||
| 187 | if (ver == TLS1_2_VERSION) | ||
| 188 | return (TLSv1_2_server_method()); | ||
| 189 | if (ver == TLS1_1_VERSION) | ||
| 190 | return (TLSv1_1_server_method()); | ||
| 191 | if (ver == TLS1_VERSION) | ||
| 192 | return (TLSv1_server_method()); | ||
| 193 | return (NULL); | ||
| 194 | } | ||
| 195 | |||
| 196 | const SSL_METHOD * | ||
| 197 | SSLv23_server_method(void) | ||
| 198 | { | ||
| 199 | return (TLS_server_method()); | ||
| 200 | } | ||
| 201 | |||
| 202 | const SSL_METHOD * | ||
| 203 | TLS_server_method(void) | ||
| 204 | { | ||
| 205 | return (&TLS_server_method_data); | ||
| 206 | } | ||
| 207 | |||
| 208 | const SSL_METHOD * | ||
| 209 | TLSv1_server_method(void) | ||
| 210 | { | ||
| 211 | return (&TLSv1_server_method_data); | ||
| 212 | } | ||
| 213 | |||
| 214 | const SSL_METHOD * | ||
| 215 | TLSv1_1_server_method(void) | ||
| 216 | { | ||
| 217 | return (&TLSv1_1_server_method_data); | ||
| 218 | } | ||
| 219 | |||
| 220 | const SSL_METHOD * | ||
| 221 | TLSv1_2_server_method(void) | ||
| 222 | { | ||
| 223 | return (&TLSv1_2_server_method_data); | ||
| 224 | } | ||
