summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2017-01-23 10:22:06 +0000
committerjsing <>2017-01-23 10:22:06 +0000
commit034e1f9018bedb7d71df3286551c19fa5bd18c07 (patch)
tree45f8733f12cae1ed103f7565222351ce0be8ccda
parent61af17199189570a4400f2757a9e8dab4bb76d2a (diff)
downloadopenbsd-034e1f9018bedb7d71df3286551c19fa5bd18c07.tar.gz
openbsd-034e1f9018bedb7d71df3286551c19fa5bd18c07.tar.bz2
openbsd-034e1f9018bedb7d71df3286551c19fa5bd18c07.zip
Remove ssl_ctrl, ssl_ctx_ctrl, ssl_callback_ctrl and ssl_ctx_callback_ctrl
from SSL_METHOD, replacing usage with direct calls to the appropriate functions. ok beck@
-rw-r--r--src/lib/libssl/d1_clnt.c6
-rw-r--r--src/lib/libssl/d1_meth.c6
-rw-r--r--src/lib/libssl/d1_srvr.c6
-rw-r--r--src/lib/libssl/ssl.h6
-rw-r--r--src/lib/libssl/ssl_lib.c12
-rw-r--r--src/lib/libssl/t1_clnt.c18
-rw-r--r--src/lib/libssl/t1_meth.c18
-rw-r--r--src/lib/libssl/t1_srvr.c18
8 files changed, 14 insertions, 76 deletions
diff --git a/src/lib/libssl/d1_clnt.c b/src/lib/libssl/d1_clnt.c
index 9319794a66..503a1f7fc6 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.67 2017/01/23 08:48:44 beck Exp $ */ 1/* $OpenBSD: d1_clnt.c,v 1.68 2017/01/23 10:22:06 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.
@@ -149,8 +149,6 @@ static const SSL_METHOD DTLSv1_client_method_data = {
149 .ssl_read_bytes = dtls1_read_bytes, 149 .ssl_read_bytes = dtls1_read_bytes,
150 .ssl_write_bytes = dtls1_write_app_data_bytes, 150 .ssl_write_bytes = dtls1_write_app_data_bytes,
151 .ssl_dispatch_alert = dtls1_dispatch_alert, 151 .ssl_dispatch_alert = dtls1_dispatch_alert,
152 .ssl_ctrl = dtls1_ctrl,
153 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
154 .get_cipher_by_char = ssl3_get_cipher_by_char, 152 .get_cipher_by_char = ssl3_get_cipher_by_char,
155 .put_cipher_by_char = ssl3_put_cipher_by_char, 153 .put_cipher_by_char = ssl3_put_cipher_by_char,
156 .ssl_pending = ssl3_pending, 154 .ssl_pending = ssl3_pending,
@@ -160,8 +158,6 @@ static const SSL_METHOD DTLSv1_client_method_data = {
160 .get_timeout = dtls1_default_timeout, 158 .get_timeout = dtls1_default_timeout,
161 .ssl3_enc = &DTLSv1_enc_data, 159 .ssl3_enc = &DTLSv1_enc_data,
162 .ssl_version = ssl_undefined_void_function, 160 .ssl_version = ssl_undefined_void_function,
163 .ssl_callback_ctrl = ssl3_callback_ctrl,
164 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
165}; 161};
166 162
167const SSL_METHOD * 163const SSL_METHOD *
diff --git a/src/lib/libssl/d1_meth.c b/src/lib/libssl/d1_meth.c
index c7604863fa..4493aa180b 100644
--- a/src/lib/libssl/d1_meth.c
+++ b/src/lib/libssl/d1_meth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_meth.c,v 1.11 2017/01/21 06:50:02 jsing Exp $ */ 1/* $OpenBSD: d1_meth.c,v 1.12 2017/01/23 10:22:06 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.
@@ -84,8 +84,6 @@ static const SSL_METHOD DTLSv1_method_data = {
84 .ssl_read_bytes = dtls1_read_bytes, 84 .ssl_read_bytes = dtls1_read_bytes,
85 .ssl_write_bytes = dtls1_write_app_data_bytes, 85 .ssl_write_bytes = dtls1_write_app_data_bytes,
86 .ssl_dispatch_alert = dtls1_dispatch_alert, 86 .ssl_dispatch_alert = dtls1_dispatch_alert,
87 .ssl_ctrl = dtls1_ctrl,
88 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
89 .get_cipher_by_char = ssl3_get_cipher_by_char, 87 .get_cipher_by_char = ssl3_get_cipher_by_char,
90 .put_cipher_by_char = ssl3_put_cipher_by_char, 88 .put_cipher_by_char = ssl3_put_cipher_by_char,
91 .ssl_pending = ssl3_pending, 89 .ssl_pending = ssl3_pending,
@@ -95,8 +93,6 @@ static const SSL_METHOD DTLSv1_method_data = {
95 .get_timeout = dtls1_default_timeout, 93 .get_timeout = dtls1_default_timeout,
96 .ssl3_enc = &DTLSv1_enc_data, 94 .ssl3_enc = &DTLSv1_enc_data,
97 .ssl_version = ssl_undefined_void_function, 95 .ssl_version = ssl_undefined_void_function,
98 .ssl_callback_ctrl = ssl3_callback_ctrl,
99 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
100}; 96};
101 97
102const SSL_METHOD * 98const SSL_METHOD *
diff --git a/src/lib/libssl/d1_srvr.c b/src/lib/libssl/d1_srvr.c
index 81a05eb30e..2a68483169 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.77 2017/01/23 08:48:44 beck Exp $ */ 1/* $OpenBSD: d1_srvr.c,v 1.78 2017/01/23 10:22:06 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.
@@ -147,8 +147,6 @@ static const SSL_METHOD DTLSv1_server_method_data = {
147 .ssl_read_bytes = dtls1_read_bytes, 147 .ssl_read_bytes = dtls1_read_bytes,
148 .ssl_write_bytes = dtls1_write_app_data_bytes, 148 .ssl_write_bytes = dtls1_write_app_data_bytes,
149 .ssl_dispatch_alert = dtls1_dispatch_alert, 149 .ssl_dispatch_alert = dtls1_dispatch_alert,
150 .ssl_ctrl = dtls1_ctrl,
151 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
152 .get_cipher_by_char = ssl3_get_cipher_by_char, 150 .get_cipher_by_char = ssl3_get_cipher_by_char,
153 .put_cipher_by_char = ssl3_put_cipher_by_char, 151 .put_cipher_by_char = ssl3_put_cipher_by_char,
154 .ssl_pending = ssl3_pending, 152 .ssl_pending = ssl3_pending,
@@ -158,8 +156,6 @@ static const SSL_METHOD DTLSv1_server_method_data = {
158 .get_timeout = dtls1_default_timeout, 156 .get_timeout = dtls1_default_timeout,
159 .ssl3_enc = &DTLSv1_enc_data, 157 .ssl3_enc = &DTLSv1_enc_data,
160 .ssl_version = ssl_undefined_void_function, 158 .ssl_version = ssl_undefined_void_function,
161 .ssl_callback_ctrl = ssl3_callback_ctrl,
162 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
163}; 159};
164 160
165const SSL_METHOD * 161const SSL_METHOD *
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h
index f29626dc03..87237fcc9b 100644
--- a/src/lib/libssl/ssl.h
+++ b/src/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl.h,v 1.116 2017/01/23 08:48:44 beck Exp $ */ 1/* $OpenBSD: ssl.h,v 1.117 2017/01/23 10:22:06 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 *
@@ -417,8 +417,6 @@ struct ssl_method_st {
417 int len, int peek); 417 int len, int peek);
418 int (*ssl_write_bytes)(SSL *s, int type, const void *buf_, int len); 418 int (*ssl_write_bytes)(SSL *s, int type, const void *buf_, int len);
419 int (*ssl_dispatch_alert)(SSL *s); 419 int (*ssl_dispatch_alert)(SSL *s);
420 long (*ssl_ctrl)(SSL *s, int cmd, long larg, void *parg);
421 long (*ssl_ctx_ctrl)(SSL_CTX *ctx, int cmd, long larg, void *parg);
422 const SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr); 420 const SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr);
423 int (*put_cipher_by_char)(const SSL_CIPHER *cipher, unsigned char *ptr); 421 int (*put_cipher_by_char)(const SSL_CIPHER *cipher, unsigned char *ptr);
424 int (*ssl_pending)(const SSL *s); 422 int (*ssl_pending)(const SSL *s);
@@ -428,8 +426,6 @@ struct ssl_method_st {
428 long (*get_timeout)(void); 426 long (*get_timeout)(void);
429 struct ssl3_enc_method *ssl3_enc; /* Extra SSLv3/TLS stuff */ 427 struct ssl3_enc_method *ssl3_enc; /* Extra SSLv3/TLS stuff */
430 int (*ssl_version)(void); 428 int (*ssl_version)(void);
431 long (*ssl_callback_ctrl)(SSL *s, int cb_id, void (*fp)(void));
432 long (*ssl_ctx_callback_ctrl)(SSL_CTX *s, int cb_id, void (*fp)(void));
433}; 429};
434 430
435/* Lets make this into an ASN.1 type structure as follows 431/* Lets make this into an ASN.1 type structure as follows
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index 571ecee509..7592249dcb 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_lib.c,v 1.137 2017/01/23 08:48:44 beck Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.138 2017/01/23 10:22:06 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 *
@@ -1092,7 +1092,9 @@ SSL_ctrl(SSL *s, int cmd, long larg, void *parg)
1092 return (S3I(s)->send_connection_binding); 1092 return (S3I(s)->send_connection_binding);
1093 else return (0); 1093 else return (0);
1094 default: 1094 default:
1095 return (s->method->ssl_ctrl(s, cmd, larg, parg)); 1095 if (SSL_IS_DTLS(s))
1096 return dtls1_ctrl(s, cmd, larg, parg);
1097 return ssl3_ctrl(s, cmd, larg, parg);
1096 } 1098 }
1097} 1099}
1098 1100
@@ -1107,7 +1109,7 @@ SSL_callback_ctrl(SSL *s, int cmd, void (*fp)(void))
1107 return (1); 1109 return (1);
1108 1110
1109 default: 1111 default:
1110 return (s->method->ssl_callback_ctrl(s, cmd, fp)); 1112 return (ssl3_callback_ctrl(s, cmd, fp));
1111 } 1113 }
1112} 1114}
1113 1115
@@ -1192,7 +1194,7 @@ SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
1192 ctx->internal->max_send_fragment = larg; 1194 ctx->internal->max_send_fragment = larg;
1193 return (1); 1195 return (1);
1194 default: 1196 default:
1195 return (ctx->method->ssl_ctx_ctrl(ctx, cmd, larg, parg)); 1197 return (ssl3_ctx_ctrl(ctx, cmd, larg, parg));
1196 } 1198 }
1197} 1199}
1198 1200
@@ -1207,7 +1209,7 @@ SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
1207 return (1); 1209 return (1);
1208 1210
1209 default: 1211 default:
1210 return (ctx->method->ssl_ctx_callback_ctrl(ctx, cmd, fp)); 1212 return (ssl3_ctx_callback_ctrl(ctx, cmd, fp));
1211 } 1213 }
1212} 1214}
1213 1215
diff --git a/src/lib/libssl/t1_clnt.c b/src/lib/libssl/t1_clnt.c
index d643d5db13..d07e54d9f7 100644
--- a/src/lib/libssl/t1_clnt.c
+++ b/src/lib/libssl/t1_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_clnt.c,v 1.20 2017/01/21 06:50:02 jsing Exp $ */ 1/* $OpenBSD: t1_clnt.c,v 1.21 2017/01/23 10:22:06 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 *
@@ -85,8 +85,6 @@ static const SSL_METHOD TLS_client_method_data = {
85 .ssl_read_bytes = ssl3_read_bytes, 85 .ssl_read_bytes = ssl3_read_bytes,
86 .ssl_write_bytes = ssl3_write_bytes, 86 .ssl_write_bytes = ssl3_write_bytes,
87 .ssl_dispatch_alert = ssl3_dispatch_alert, 87 .ssl_dispatch_alert = ssl3_dispatch_alert,
88 .ssl_ctrl = ssl3_ctrl,
89 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
90 .get_cipher_by_char = ssl3_get_cipher_by_char, 88 .get_cipher_by_char = ssl3_get_cipher_by_char,
91 .put_cipher_by_char = ssl3_put_cipher_by_char, 89 .put_cipher_by_char = ssl3_put_cipher_by_char,
92 .ssl_pending = ssl_undefined_const_function, 90 .ssl_pending = ssl_undefined_const_function,
@@ -96,8 +94,6 @@ static const SSL_METHOD TLS_client_method_data = {
96 .get_timeout = ssl23_default_timeout, 94 .get_timeout = ssl23_default_timeout,
97 .ssl3_enc = &ssl3_undef_enc_method, 95 .ssl3_enc = &ssl3_undef_enc_method,
98 .ssl_version = ssl_undefined_void_function, 96 .ssl_version = ssl_undefined_void_function,
99 .ssl_callback_ctrl = ssl3_callback_ctrl,
100 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
101}; 97};
102 98
103static const SSL_METHOD TLSv1_client_method_data = { 99static const SSL_METHOD TLSv1_client_method_data = {
@@ -119,8 +115,6 @@ static const SSL_METHOD TLSv1_client_method_data = {
119 .ssl_read_bytes = ssl3_read_bytes, 115 .ssl_read_bytes = ssl3_read_bytes,
120 .ssl_write_bytes = ssl3_write_bytes, 116 .ssl_write_bytes = ssl3_write_bytes,
121 .ssl_dispatch_alert = ssl3_dispatch_alert, 117 .ssl_dispatch_alert = ssl3_dispatch_alert,
122 .ssl_ctrl = ssl3_ctrl,
123 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
124 .get_cipher_by_char = ssl3_get_cipher_by_char, 118 .get_cipher_by_char = ssl3_get_cipher_by_char,
125 .put_cipher_by_char = ssl3_put_cipher_by_char, 119 .put_cipher_by_char = ssl3_put_cipher_by_char,
126 .ssl_pending = ssl3_pending, 120 .ssl_pending = ssl3_pending,
@@ -130,8 +124,6 @@ static const SSL_METHOD TLSv1_client_method_data = {
130 .get_timeout = tls1_default_timeout, 124 .get_timeout = tls1_default_timeout,
131 .ssl3_enc = &TLSv1_enc_data, 125 .ssl3_enc = &TLSv1_enc_data,
132 .ssl_version = ssl_undefined_void_function, 126 .ssl_version = ssl_undefined_void_function,
133 .ssl_callback_ctrl = ssl3_callback_ctrl,
134 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
135}; 127};
136 128
137static const SSL_METHOD TLSv1_1_client_method_data = { 129static const SSL_METHOD TLSv1_1_client_method_data = {
@@ -153,8 +145,6 @@ static const SSL_METHOD TLSv1_1_client_method_data = {
153 .ssl_read_bytes = ssl3_read_bytes, 145 .ssl_read_bytes = ssl3_read_bytes,
154 .ssl_write_bytes = ssl3_write_bytes, 146 .ssl_write_bytes = ssl3_write_bytes,
155 .ssl_dispatch_alert = ssl3_dispatch_alert, 147 .ssl_dispatch_alert = ssl3_dispatch_alert,
156 .ssl_ctrl = ssl3_ctrl,
157 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
158 .get_cipher_by_char = ssl3_get_cipher_by_char, 148 .get_cipher_by_char = ssl3_get_cipher_by_char,
159 .put_cipher_by_char = ssl3_put_cipher_by_char, 149 .put_cipher_by_char = ssl3_put_cipher_by_char,
160 .ssl_pending = ssl3_pending, 150 .ssl_pending = ssl3_pending,
@@ -164,8 +154,6 @@ static const SSL_METHOD TLSv1_1_client_method_data = {
164 .get_timeout = tls1_default_timeout, 154 .get_timeout = tls1_default_timeout,
165 .ssl3_enc = &TLSv1_1_enc_data, 155 .ssl3_enc = &TLSv1_1_enc_data,
166 .ssl_version = ssl_undefined_void_function, 156 .ssl_version = ssl_undefined_void_function,
167 .ssl_callback_ctrl = ssl3_callback_ctrl,
168 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
169}; 157};
170 158
171static const SSL_METHOD TLSv1_2_client_method_data = { 159static const SSL_METHOD TLSv1_2_client_method_data = {
@@ -187,8 +175,6 @@ static const SSL_METHOD TLSv1_2_client_method_data = {
187 .ssl_read_bytes = ssl3_read_bytes, 175 .ssl_read_bytes = ssl3_read_bytes,
188 .ssl_write_bytes = ssl3_write_bytes, 176 .ssl_write_bytes = ssl3_write_bytes,
189 .ssl_dispatch_alert = ssl3_dispatch_alert, 177 .ssl_dispatch_alert = ssl3_dispatch_alert,
190 .ssl_ctrl = ssl3_ctrl,
191 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
192 .get_cipher_by_char = ssl3_get_cipher_by_char, 178 .get_cipher_by_char = ssl3_get_cipher_by_char,
193 .put_cipher_by_char = ssl3_put_cipher_by_char, 179 .put_cipher_by_char = ssl3_put_cipher_by_char,
194 .ssl_pending = ssl3_pending, 180 .ssl_pending = ssl3_pending,
@@ -198,8 +184,6 @@ static const SSL_METHOD TLSv1_2_client_method_data = {
198 .get_timeout = tls1_default_timeout, 184 .get_timeout = tls1_default_timeout,
199 .ssl3_enc = &TLSv1_2_enc_data, 185 .ssl3_enc = &TLSv1_2_enc_data,
200 .ssl_version = ssl_undefined_void_function, 186 .ssl_version = ssl_undefined_void_function,
201 .ssl_callback_ctrl = ssl3_callback_ctrl,
202 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
203}; 187};
204 188
205static const SSL_METHOD * 189static const SSL_METHOD *
diff --git a/src/lib/libssl/t1_meth.c b/src/lib/libssl/t1_meth.c
index 5c37142ab3..521839184c 100644
--- a/src/lib/libssl/t1_meth.c
+++ b/src/lib/libssl/t1_meth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_meth.c,v 1.19 2017/01/21 06:50:02 jsing Exp $ */ 1/* $OpenBSD: t1_meth.c,v 1.20 2017/01/23 10:22:06 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 *
@@ -83,8 +83,6 @@ static const SSL_METHOD TLS_method_data = {
83 .ssl_read_bytes = ssl3_read_bytes, 83 .ssl_read_bytes = ssl3_read_bytes,
84 .ssl_write_bytes = ssl3_write_bytes, 84 .ssl_write_bytes = ssl3_write_bytes,
85 .ssl_dispatch_alert = ssl3_dispatch_alert, 85 .ssl_dispatch_alert = ssl3_dispatch_alert,
86 .ssl_ctrl = ssl3_ctrl,
87 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
88 .get_cipher_by_char = ssl3_get_cipher_by_char, 86 .get_cipher_by_char = ssl3_get_cipher_by_char,
89 .put_cipher_by_char = ssl3_put_cipher_by_char, 87 .put_cipher_by_char = ssl3_put_cipher_by_char,
90 .ssl_pending = ssl_undefined_const_function, 88 .ssl_pending = ssl_undefined_const_function,
@@ -94,8 +92,6 @@ static const SSL_METHOD TLS_method_data = {
94 .get_timeout = ssl23_default_timeout, 92 .get_timeout = ssl23_default_timeout,
95 .ssl3_enc = &ssl3_undef_enc_method, 93 .ssl3_enc = &ssl3_undef_enc_method,
96 .ssl_version = ssl_undefined_void_function, 94 .ssl_version = ssl_undefined_void_function,
97 .ssl_callback_ctrl = ssl3_callback_ctrl,
98 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
99}; 95};
100 96
101static const SSL_METHOD TLSv1_method_data = { 97static const SSL_METHOD TLSv1_method_data = {
@@ -117,8 +113,6 @@ static const SSL_METHOD TLSv1_method_data = {
117 .ssl_read_bytes = ssl3_read_bytes, 113 .ssl_read_bytes = ssl3_read_bytes,
118 .ssl_write_bytes = ssl3_write_bytes, 114 .ssl_write_bytes = ssl3_write_bytes,
119 .ssl_dispatch_alert = ssl3_dispatch_alert, 115 .ssl_dispatch_alert = ssl3_dispatch_alert,
120 .ssl_ctrl = ssl3_ctrl,
121 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
122 .get_cipher_by_char = ssl3_get_cipher_by_char, 116 .get_cipher_by_char = ssl3_get_cipher_by_char,
123 .put_cipher_by_char = ssl3_put_cipher_by_char, 117 .put_cipher_by_char = ssl3_put_cipher_by_char,
124 .ssl_pending = ssl3_pending, 118 .ssl_pending = ssl3_pending,
@@ -128,8 +122,6 @@ static const SSL_METHOD TLSv1_method_data = {
128 .get_timeout = tls1_default_timeout, 122 .get_timeout = tls1_default_timeout,
129 .ssl3_enc = &TLSv1_enc_data, 123 .ssl3_enc = &TLSv1_enc_data,
130 .ssl_version = ssl_undefined_void_function, 124 .ssl_version = ssl_undefined_void_function,
131 .ssl_callback_ctrl = ssl3_callback_ctrl,
132 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
133}; 125};
134 126
135static const SSL_METHOD TLSv1_1_method_data = { 127static const SSL_METHOD TLSv1_1_method_data = {
@@ -151,8 +143,6 @@ static const SSL_METHOD TLSv1_1_method_data = {
151 .ssl_read_bytes = ssl3_read_bytes, 143 .ssl_read_bytes = ssl3_read_bytes,
152 .ssl_write_bytes = ssl3_write_bytes, 144 .ssl_write_bytes = ssl3_write_bytes,
153 .ssl_dispatch_alert = ssl3_dispatch_alert, 145 .ssl_dispatch_alert = ssl3_dispatch_alert,
154 .ssl_ctrl = ssl3_ctrl,
155 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
156 .get_cipher_by_char = ssl3_get_cipher_by_char, 146 .get_cipher_by_char = ssl3_get_cipher_by_char,
157 .put_cipher_by_char = ssl3_put_cipher_by_char, 147 .put_cipher_by_char = ssl3_put_cipher_by_char,
158 .ssl_pending = ssl3_pending, 148 .ssl_pending = ssl3_pending,
@@ -162,8 +152,6 @@ static const SSL_METHOD TLSv1_1_method_data = {
162 .get_timeout = tls1_default_timeout, 152 .get_timeout = tls1_default_timeout,
163 .ssl3_enc = &TLSv1_1_enc_data, 153 .ssl3_enc = &TLSv1_1_enc_data,
164 .ssl_version = ssl_undefined_void_function, 154 .ssl_version = ssl_undefined_void_function,
165 .ssl_callback_ctrl = ssl3_callback_ctrl,
166 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
167}; 155};
168 156
169static const SSL_METHOD TLSv1_2_method_data = { 157static const SSL_METHOD TLSv1_2_method_data = {
@@ -185,8 +173,6 @@ static const SSL_METHOD TLSv1_2_method_data = {
185 .ssl_read_bytes = ssl3_read_bytes, 173 .ssl_read_bytes = ssl3_read_bytes,
186 .ssl_write_bytes = ssl3_write_bytes, 174 .ssl_write_bytes = ssl3_write_bytes,
187 .ssl_dispatch_alert = ssl3_dispatch_alert, 175 .ssl_dispatch_alert = ssl3_dispatch_alert,
188 .ssl_ctrl = ssl3_ctrl,
189 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
190 .get_cipher_by_char = ssl3_get_cipher_by_char, 176 .get_cipher_by_char = ssl3_get_cipher_by_char,
191 .put_cipher_by_char = ssl3_put_cipher_by_char, 177 .put_cipher_by_char = ssl3_put_cipher_by_char,
192 .ssl_pending = ssl3_pending, 178 .ssl_pending = ssl3_pending,
@@ -196,8 +182,6 @@ static const SSL_METHOD TLSv1_2_method_data = {
196 .get_timeout = tls1_default_timeout, 182 .get_timeout = tls1_default_timeout,
197 .ssl3_enc = &TLSv1_2_enc_data, 183 .ssl3_enc = &TLSv1_2_enc_data,
198 .ssl_version = ssl_undefined_void_function, 184 .ssl_version = ssl_undefined_void_function,
199 .ssl_callback_ctrl = ssl3_callback_ctrl,
200 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
201}; 185};
202 186
203static const SSL_METHOD * 187static const SSL_METHOD *
diff --git a/src/lib/libssl/t1_srvr.c b/src/lib/libssl/t1_srvr.c
index 84ed66c7ed..e0b247441a 100644
--- a/src/lib/libssl/t1_srvr.c
+++ b/src/lib/libssl/t1_srvr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_srvr.c,v 1.21 2017/01/21 06:50:02 jsing Exp $ */ 1/* $OpenBSD: t1_srvr.c,v 1.22 2017/01/23 10:22:06 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 *
@@ -86,8 +86,6 @@ static const SSL_METHOD TLS_server_method_data = {
86 .ssl_read_bytes = ssl3_read_bytes, 86 .ssl_read_bytes = ssl3_read_bytes,
87 .ssl_write_bytes = ssl3_write_bytes, 87 .ssl_write_bytes = ssl3_write_bytes,
88 .ssl_dispatch_alert = ssl3_dispatch_alert, 88 .ssl_dispatch_alert = ssl3_dispatch_alert,
89 .ssl_ctrl = ssl3_ctrl,
90 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
91 .get_cipher_by_char = ssl3_get_cipher_by_char, 89 .get_cipher_by_char = ssl3_get_cipher_by_char,
92 .put_cipher_by_char = ssl3_put_cipher_by_char, 90 .put_cipher_by_char = ssl3_put_cipher_by_char,
93 .ssl_pending = ssl_undefined_const_function, 91 .ssl_pending = ssl_undefined_const_function,
@@ -97,8 +95,6 @@ static const SSL_METHOD TLS_server_method_data = {
97 .get_timeout = ssl23_default_timeout, 95 .get_timeout = ssl23_default_timeout,
98 .ssl3_enc = &ssl3_undef_enc_method, 96 .ssl3_enc = &ssl3_undef_enc_method,
99 .ssl_version = ssl_undefined_void_function, 97 .ssl_version = ssl_undefined_void_function,
100 .ssl_callback_ctrl = ssl3_callback_ctrl,
101 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
102}; 98};
103 99
104static const SSL_METHOD TLSv1_server_method_data = { 100static const SSL_METHOD TLSv1_server_method_data = {
@@ -120,8 +116,6 @@ static const SSL_METHOD TLSv1_server_method_data = {
120 .ssl_read_bytes = ssl3_read_bytes, 116 .ssl_read_bytes = ssl3_read_bytes,
121 .ssl_write_bytes = ssl3_write_bytes, 117 .ssl_write_bytes = ssl3_write_bytes,
122 .ssl_dispatch_alert = ssl3_dispatch_alert, 118 .ssl_dispatch_alert = ssl3_dispatch_alert,
123 .ssl_ctrl = ssl3_ctrl,
124 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
125 .get_cipher_by_char = ssl3_get_cipher_by_char, 119 .get_cipher_by_char = ssl3_get_cipher_by_char,
126 .put_cipher_by_char = ssl3_put_cipher_by_char, 120 .put_cipher_by_char = ssl3_put_cipher_by_char,
127 .ssl_pending = ssl3_pending, 121 .ssl_pending = ssl3_pending,
@@ -131,8 +125,6 @@ static const SSL_METHOD TLSv1_server_method_data = {
131 .get_timeout = tls1_default_timeout, 125 .get_timeout = tls1_default_timeout,
132 .ssl3_enc = &TLSv1_enc_data, 126 .ssl3_enc = &TLSv1_enc_data,
133 .ssl_version = ssl_undefined_void_function, 127 .ssl_version = ssl_undefined_void_function,
134 .ssl_callback_ctrl = ssl3_callback_ctrl,
135 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
136}; 128};
137 129
138static const SSL_METHOD TLSv1_1_server_method_data = { 130static const SSL_METHOD TLSv1_1_server_method_data = {
@@ -154,8 +146,6 @@ static const SSL_METHOD TLSv1_1_server_method_data = {
154 .ssl_read_bytes = ssl3_read_bytes, 146 .ssl_read_bytes = ssl3_read_bytes,
155 .ssl_write_bytes = ssl3_write_bytes, 147 .ssl_write_bytes = ssl3_write_bytes,
156 .ssl_dispatch_alert = ssl3_dispatch_alert, 148 .ssl_dispatch_alert = ssl3_dispatch_alert,
157 .ssl_ctrl = ssl3_ctrl,
158 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
159 .get_cipher_by_char = ssl3_get_cipher_by_char, 149 .get_cipher_by_char = ssl3_get_cipher_by_char,
160 .put_cipher_by_char = ssl3_put_cipher_by_char, 150 .put_cipher_by_char = ssl3_put_cipher_by_char,
161 .ssl_pending = ssl3_pending, 151 .ssl_pending = ssl3_pending,
@@ -165,8 +155,6 @@ static const SSL_METHOD TLSv1_1_server_method_data = {
165 .get_timeout = tls1_default_timeout, 155 .get_timeout = tls1_default_timeout,
166 .ssl3_enc = &TLSv1_1_enc_data, 156 .ssl3_enc = &TLSv1_1_enc_data,
167 .ssl_version = ssl_undefined_void_function, 157 .ssl_version = ssl_undefined_void_function,
168 .ssl_callback_ctrl = ssl3_callback_ctrl,
169 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
170}; 158};
171 159
172static const SSL_METHOD TLSv1_2_server_method_data = { 160static const SSL_METHOD TLSv1_2_server_method_data = {
@@ -188,8 +176,6 @@ static const SSL_METHOD TLSv1_2_server_method_data = {
188 .ssl_read_bytes = ssl3_read_bytes, 176 .ssl_read_bytes = ssl3_read_bytes,
189 .ssl_write_bytes = ssl3_write_bytes, 177 .ssl_write_bytes = ssl3_write_bytes,
190 .ssl_dispatch_alert = ssl3_dispatch_alert, 178 .ssl_dispatch_alert = ssl3_dispatch_alert,
191 .ssl_ctrl = ssl3_ctrl,
192 .ssl_ctx_ctrl = ssl3_ctx_ctrl,
193 .get_cipher_by_char = ssl3_get_cipher_by_char, 179 .get_cipher_by_char = ssl3_get_cipher_by_char,
194 .put_cipher_by_char = ssl3_put_cipher_by_char, 180 .put_cipher_by_char = ssl3_put_cipher_by_char,
195 .ssl_pending = ssl3_pending, 181 .ssl_pending = ssl3_pending,
@@ -199,8 +185,6 @@ static const SSL_METHOD TLSv1_2_server_method_data = {
199 .get_timeout = tls1_default_timeout, 185 .get_timeout = tls1_default_timeout,
200 .ssl3_enc = &TLSv1_2_enc_data, 186 .ssl3_enc = &TLSv1_2_enc_data,
201 .ssl_version = ssl_undefined_void_function, 187 .ssl_version = ssl_undefined_void_function,
202 .ssl_callback_ctrl = ssl3_callback_ctrl,
203 .ssl_ctx_callback_ctrl = ssl3_ctx_callback_ctrl,
204}; 188};
205 189
206static const SSL_METHOD * 190static const SSL_METHOD *