summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s23_clnt.c
diff options
context:
space:
mode:
authorjsing <>2015-09-11 14:39:05 +0000
committerjsing <>2015-09-11 14:39:05 +0000
commit2c40cd0dff703f3e672fb8ce90cabd51df5b8865 (patch)
tree71984eed9669cd22b85259c9cc4e5d60cec10b0b /src/lib/libssl/s23_clnt.c
parente2fad4e6bdd4e404b3f4c186de52078738af2271 (diff)
downloadopenbsd-2c40cd0dff703f3e672fb8ce90cabd51df5b8865.tar.gz
openbsd-2c40cd0dff703f3e672fb8ce90cabd51df5b8865.tar.bz2
openbsd-2c40cd0dff703f3e672fb8ce90cabd51df5b8865.zip
Put the *client_method* data structures and functions in the same place.
We can also now nuke ssl23_get_client_method() since it is the same as tls1_get_client_method(). ok bcook@ miod@
Diffstat (limited to '')
-rw-r--r--src/lib/libssl/s23_clnt.c59
1 files changed, 1 insertions, 58 deletions
diff --git a/src/lib/libssl/s23_clnt.c b/src/lib/libssl/s23_clnt.c
index 96b9ac9429..1078bc0155 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.44 2015/09/02 17:53:54 jsing Exp $ */ 1/* $OpenBSD: s23_clnt.c,v 1.45 2015/09/11 14:39:05 jsing 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 *
@@ -117,60 +117,9 @@
117#include <openssl/evp.h> 117#include <openssl/evp.h>
118#include <openssl/objects.h> 118#include <openssl/objects.h>
119 119
120static const SSL_METHOD *ssl23_get_client_method(int ver);
121static int ssl23_client_hello(SSL *s); 120static int ssl23_client_hello(SSL *s);
122static int ssl23_get_server_hello(SSL *s); 121static int ssl23_get_server_hello(SSL *s);
123 122
124const SSL_METHOD SSLv23_client_method_data = {
125 .version = TLS1_2_VERSION,
126 .ssl_new = tls1_new,
127 .ssl_clear = tls1_clear,
128 .ssl_free = tls1_free,
129 .ssl_accept = ssl_undefined_function,
130 .ssl_connect = ssl23_connect,
131 .ssl_read = ssl23_read,
132 .ssl_peek = ssl23_peek,
133 .ssl_write = ssl23_write,
134 .ssl_shutdown = ssl_undefined_function,
135 .ssl_renegotiate = ssl_undefined_function,
136 .ssl_renegotiate_check = ssl_ok,
137 .ssl_get_message = ssl3_get_message,
138 .ssl_read_bytes = ssl3_read_bytes,
139 .ssl_write_bytes = ssl3_write_bytes,
140 .ssl_dispatch_alert = ssl3_dispatch_alert,
141 .ssl_ctrl = ssl3_ctrl,
142 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
143 .get_cipher_by_char = ssl3_get_cipher_by_char,
144 .put_cipher_by_char = ssl3_put_cipher_by_char,
145 .ssl_pending = ssl_undefined_const_function,
146 .num_ciphers = ssl3_num_ciphers,
147 .get_cipher = ssl3_get_cipher,
148 .get_ssl_method = ssl23_get_client_method,
149 .get_timeout = ssl23_default_timeout,
150 .ssl3_enc = &ssl3_undef_enc_method,
151 .ssl_version = ssl_undefined_void_function,
152 .ssl_callback_ctrl = ssl3_callback_ctrl,
153 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
154};
155
156const SSL_METHOD *
157SSLv23_client_method(void)
158{
159 return &SSLv23_client_method_data;
160}
161
162static const SSL_METHOD *
163ssl23_get_client_method(int ver)
164{
165 if (ver == TLS1_VERSION)
166 return (TLSv1_client_method());
167 if (ver == TLS1_1_VERSION)
168 return (TLSv1_1_client_method());
169 if (ver == TLS1_2_VERSION)
170 return (TLSv1_2_client_method());
171 return (NULL);
172}
173
174int 123int
175ssl23_connect(SSL *s) 124ssl23_connect(SSL *s)
176{ 125{
@@ -529,9 +478,3 @@ ssl23_get_server_hello(SSL *s)
529err: 478err:
530 return (-1); 479 return (-1);
531} 480}
532
533const SSL_METHOD *
534TLS_client_method(void)
535{
536 return &SSLv23_client_method_data;
537}