diff options
Diffstat (limited to 'src/lib/libssl/s23_clnt.c')
-rw-r--r-- | src/lib/libssl/s23_clnt.c | 62 |
1 files changed, 2 insertions, 60 deletions
diff --git a/src/lib/libssl/s23_clnt.c b/src/lib/libssl/s23_clnt.c index a99a7691bd..aa668a3ccf 100644 --- a/src/lib/libssl/s23_clnt.c +++ b/src/lib/libssl/s23_clnt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s23_clnt.c,v 1.41 2015/08/27 06:21:15 doug Exp $ */ | 1 | /* $OpenBSD: s23_clnt.c,v 1.42 2015/08/29 17:15:52 doug Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -120,7 +120,6 @@ | |||
120 | static const SSL_METHOD *ssl23_get_client_method(int ver); | 120 | static const SSL_METHOD *ssl23_get_client_method(int ver); |
121 | static int ssl23_client_hello(SSL *s); | 121 | static int ssl23_client_hello(SSL *s); |
122 | static int ssl23_get_server_hello(SSL *s); | 122 | static int ssl23_get_server_hello(SSL *s); |
123 | static const SSL_METHOD *tls_any_get_client_method(int ver); | ||
124 | 123 | ||
125 | const SSL_METHOD SSLv23_client_method_data = { | 124 | const SSL_METHOD SSLv23_client_method_data = { |
126 | .version = TLS1_2_VERSION, | 125 | .version = TLS1_2_VERSION, |
@@ -154,39 +153,6 @@ const SSL_METHOD SSLv23_client_method_data = { | |||
154 | .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, | 153 | .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, |
155 | }; | 154 | }; |
156 | 155 | ||
157 | const SSL_METHOD TLS_client_method_data = { | ||
158 | .version = TLS1_2_VERSION, | ||
159 | .ssl_new = tls1_new, | ||
160 | .ssl_clear = tls1_clear, | ||
161 | .ssl_free = tls1_free, | ||
162 | .ssl_accept = ssl_undefined_function, | ||
163 | .ssl_connect = tls_any_connect, | ||
164 | .ssl_read = ssl23_read, | ||
165 | .ssl_peek = ssl23_peek, | ||
166 | .ssl_write = ssl23_write, | ||
167 | .ssl_shutdown = ssl_undefined_function, | ||
168 | .ssl_renegotiate = ssl_undefined_function, | ||
169 | .ssl_renegotiate_check = ssl_ok, | ||
170 | .ssl_get_message = ssl3_get_message, | ||
171 | .ssl_read_bytes = ssl3_read_bytes, | ||
172 | .ssl_write_bytes = ssl3_write_bytes, | ||
173 | .ssl_dispatch_alert = ssl3_dispatch_alert, | ||
174 | .ssl_ctrl = ssl3_ctrl, | ||
175 | .ssl_ctx_ctrl = ssl3_ctx_ctrl, | ||
176 | .get_cipher_by_char = ssl3_get_cipher_by_char, | ||
177 | .put_cipher_by_char = ssl3_put_cipher_by_char, | ||
178 | .ssl_pending = ssl_undefined_const_function, | ||
179 | .num_ciphers = ssl3_num_ciphers, | ||
180 | .get_cipher = ssl3_get_cipher, | ||
181 | .get_ssl_method = tls_any_get_client_method, | ||
182 | .get_timeout = ssl23_default_timeout, | ||
183 | .ssl3_enc = &ssl3_undef_enc_method, | ||
184 | .ssl_version = ssl_undefined_void_function, | ||
185 | .ssl_callback_ctrl = ssl3_callback_ctrl, | ||
186 | .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl, | ||
187 | }; | ||
188 | |||
189 | |||
190 | const SSL_METHOD * | 156 | const SSL_METHOD * |
191 | SSLv23_client_method(void) | 157 | SSLv23_client_method(void) |
192 | { | 158 | { |
@@ -570,29 +536,5 @@ err: | |||
570 | const SSL_METHOD * | 536 | const SSL_METHOD * |
571 | TLS_client_method(void) | 537 | TLS_client_method(void) |
572 | { | 538 | { |
573 | return &TLS_client_method_data; | 539 | return &SSLv23_client_method_data; |
574 | } | ||
575 | |||
576 | static const SSL_METHOD * | ||
577 | tls_any_get_client_method(int ver) | ||
578 | { | ||
579 | if (ver == SSL3_VERSION) | ||
580 | return (NULL); | ||
581 | else | ||
582 | return ssl23_get_client_method(ver); | ||
583 | } | ||
584 | |||
585 | int | ||
586 | tls_any_connect(SSL *s) | ||
587 | { | ||
588 | int ret; | ||
589 | unsigned long old_options; | ||
590 | |||
591 | old_options = s->options; | ||
592 | |||
593 | s->options |= SSL_OP_NO_SSLv3; | ||
594 | ret = ssl23_connect(s); | ||
595 | s->options = old_options; | ||
596 | |||
597 | return ret; | ||
598 | } | 540 | } |