diff options
author | jsing <> | 2021-07-01 17:53:39 +0000 |
---|---|---|
committer | jsing <> | 2021-07-01 17:53:39 +0000 |
commit | a0afc1b4032278e02db285a67fa2e295e9970176 (patch) | |
tree | 57d97f559edf3211313bbaee593ec7483ded13e4 /src/lib/libssl/ssl_methods.c | |
parent | bd1a6cca8085312ddc750a73ac51cba9231bfcf6 (diff) | |
download | openbsd-a0afc1b4032278e02db285a67fa2e295e9970176.tar.gz openbsd-a0afc1b4032278e02db285a67fa2e295e9970176.tar.bz2 openbsd-a0afc1b4032278e02db285a67fa2e295e9970176.zip |
Merge SSL_METHOD_INTERNAL into SSL_METHOD.
Now that SSL_METHOD is opaque and in internal headers, we can remove
SSL_METHOD_INTERNAL by merging it back into SSL_METHOD.
ok tb@
Diffstat (limited to 'src/lib/libssl/ssl_methods.c')
-rw-r--r-- | src/lib/libssl/ssl_methods.c | 130 |
1 files changed, 33 insertions, 97 deletions
diff --git a/src/lib/libssl/ssl_methods.c b/src/lib/libssl/ssl_methods.c index f1a59cd738..a3097c37b9 100644 --- a/src/lib/libssl/ssl_methods.c +++ b/src/lib/libssl/ssl_methods.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_methods.c,v 1.25 2021/05/16 13:56:31 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_methods.c,v 1.26 2021/07/01 17:53:39 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 | * |
@@ -60,7 +60,7 @@ | |||
60 | #include "ssl_locl.h" | 60 | #include "ssl_locl.h" |
61 | #include "tls13_internal.h" | 61 | #include "tls13_internal.h" |
62 | 62 | ||
63 | static const SSL_METHOD_INTERNAL DTLS_method_internal_data = { | 63 | static const SSL_METHOD DTLS_method_data = { |
64 | .dtls = 1, | 64 | .dtls = 1, |
65 | .server = 1, | 65 | .server = 1, |
66 | .version = DTLS1_2_VERSION, | 66 | .version = DTLS1_2_VERSION, |
@@ -77,19 +77,15 @@ static const SSL_METHOD_INTERNAL DTLS_method_internal_data = { | |||
77 | .ssl_pending = ssl3_pending, | 77 | .ssl_pending = ssl3_pending, |
78 | .ssl_read_bytes = dtls1_read_bytes, | 78 | .ssl_read_bytes = dtls1_read_bytes, |
79 | .ssl_write_bytes = dtls1_write_app_data_bytes, | 79 | .ssl_write_bytes = dtls1_write_app_data_bytes, |
80 | .enc_flags = TLSV1_2_ENC_FLAGS, | ||
81 | }; | ||
82 | |||
83 | static const SSL_METHOD DTLS_method_data = { | ||
84 | .ssl_dispatch_alert = dtls1_dispatch_alert, | 80 | .ssl_dispatch_alert = dtls1_dispatch_alert, |
85 | .num_ciphers = ssl3_num_ciphers, | 81 | .num_ciphers = ssl3_num_ciphers, |
86 | .get_cipher = dtls1_get_cipher, | 82 | .get_cipher = dtls1_get_cipher, |
87 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 83 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
88 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 84 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
89 | .internal = &DTLS_method_internal_data, | 85 | .enc_flags = TLSV1_2_ENC_FLAGS, |
90 | }; | 86 | }; |
91 | 87 | ||
92 | static const SSL_METHOD_INTERNAL DTLS_client_method_internal_data = { | 88 | static const SSL_METHOD DTLS_client_method_data = { |
93 | .dtls = 1, | 89 | .dtls = 1, |
94 | .server = 0, | 90 | .server = 0, |
95 | .version = DTLS1_2_VERSION, | 91 | .version = DTLS1_2_VERSION, |
@@ -106,19 +102,15 @@ static const SSL_METHOD_INTERNAL DTLS_client_method_internal_data = { | |||
106 | .ssl_pending = ssl3_pending, | 102 | .ssl_pending = ssl3_pending, |
107 | .ssl_read_bytes = dtls1_read_bytes, | 103 | .ssl_read_bytes = dtls1_read_bytes, |
108 | .ssl_write_bytes = dtls1_write_app_data_bytes, | 104 | .ssl_write_bytes = dtls1_write_app_data_bytes, |
109 | .enc_flags = TLSV1_2_ENC_FLAGS, | ||
110 | }; | ||
111 | |||
112 | static const SSL_METHOD DTLS_client_method_data = { | ||
113 | .ssl_dispatch_alert = dtls1_dispatch_alert, | 105 | .ssl_dispatch_alert = dtls1_dispatch_alert, |
114 | .num_ciphers = ssl3_num_ciphers, | 106 | .num_ciphers = ssl3_num_ciphers, |
115 | .get_cipher = dtls1_get_cipher, | 107 | .get_cipher = dtls1_get_cipher, |
116 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 108 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
117 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 109 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
118 | .internal = &DTLS_client_method_internal_data, | 110 | .enc_flags = TLSV1_2_ENC_FLAGS, |
119 | }; | 111 | }; |
120 | 112 | ||
121 | static const SSL_METHOD_INTERNAL DTLSv1_method_internal_data = { | 113 | static const SSL_METHOD DTLSv1_method_data = { |
122 | .dtls = 1, | 114 | .dtls = 1, |
123 | .server = 1, | 115 | .server = 1, |
124 | .version = DTLS1_VERSION, | 116 | .version = DTLS1_VERSION, |
@@ -135,19 +127,15 @@ static const SSL_METHOD_INTERNAL DTLSv1_method_internal_data = { | |||
135 | .ssl_pending = ssl3_pending, | 127 | .ssl_pending = ssl3_pending, |
136 | .ssl_read_bytes = dtls1_read_bytes, | 128 | .ssl_read_bytes = dtls1_read_bytes, |
137 | .ssl_write_bytes = dtls1_write_app_data_bytes, | 129 | .ssl_write_bytes = dtls1_write_app_data_bytes, |
138 | .enc_flags = TLSV1_1_ENC_FLAGS, | ||
139 | }; | ||
140 | |||
141 | static const SSL_METHOD DTLSv1_method_data = { | ||
142 | .ssl_dispatch_alert = dtls1_dispatch_alert, | 130 | .ssl_dispatch_alert = dtls1_dispatch_alert, |
143 | .num_ciphers = ssl3_num_ciphers, | 131 | .num_ciphers = ssl3_num_ciphers, |
144 | .get_cipher = dtls1_get_cipher, | 132 | .get_cipher = dtls1_get_cipher, |
145 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 133 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
146 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 134 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
147 | .internal = &DTLSv1_method_internal_data, | 135 | .enc_flags = TLSV1_1_ENC_FLAGS, |
148 | }; | 136 | }; |
149 | 137 | ||
150 | static const SSL_METHOD_INTERNAL DTLSv1_client_method_internal_data = { | 138 | static const SSL_METHOD DTLSv1_client_method_data = { |
151 | .dtls = 1, | 139 | .dtls = 1, |
152 | .server = 0, | 140 | .server = 0, |
153 | .version = DTLS1_VERSION, | 141 | .version = DTLS1_VERSION, |
@@ -164,19 +152,15 @@ static const SSL_METHOD_INTERNAL DTLSv1_client_method_internal_data = { | |||
164 | .ssl_pending = ssl3_pending, | 152 | .ssl_pending = ssl3_pending, |
165 | .ssl_read_bytes = dtls1_read_bytes, | 153 | .ssl_read_bytes = dtls1_read_bytes, |
166 | .ssl_write_bytes = dtls1_write_app_data_bytes, | 154 | .ssl_write_bytes = dtls1_write_app_data_bytes, |
167 | .enc_flags = TLSV1_1_ENC_FLAGS, | ||
168 | }; | ||
169 | |||
170 | static const SSL_METHOD DTLSv1_client_method_data = { | ||
171 | .ssl_dispatch_alert = dtls1_dispatch_alert, | 155 | .ssl_dispatch_alert = dtls1_dispatch_alert, |
172 | .num_ciphers = ssl3_num_ciphers, | 156 | .num_ciphers = ssl3_num_ciphers, |
173 | .get_cipher = dtls1_get_cipher, | 157 | .get_cipher = dtls1_get_cipher, |
174 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 158 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
175 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 159 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
176 | .internal = &DTLSv1_client_method_internal_data, | 160 | .enc_flags = TLSV1_1_ENC_FLAGS, |
177 | }; | 161 | }; |
178 | 162 | ||
179 | static const SSL_METHOD_INTERNAL DTLSv1_2_method_internal_data = { | 163 | static const SSL_METHOD DTLSv1_2_method_data = { |
180 | .dtls = 1, | 164 | .dtls = 1, |
181 | .server = 1, | 165 | .server = 1, |
182 | .version = DTLS1_2_VERSION, | 166 | .version = DTLS1_2_VERSION, |
@@ -193,19 +177,15 @@ static const SSL_METHOD_INTERNAL DTLSv1_2_method_internal_data = { | |||
193 | .ssl_pending = ssl3_pending, | 177 | .ssl_pending = ssl3_pending, |
194 | .ssl_read_bytes = dtls1_read_bytes, | 178 | .ssl_read_bytes = dtls1_read_bytes, |
195 | .ssl_write_bytes = dtls1_write_app_data_bytes, | 179 | .ssl_write_bytes = dtls1_write_app_data_bytes, |
196 | .enc_flags = TLSV1_2_ENC_FLAGS, | ||
197 | }; | ||
198 | |||
199 | static const SSL_METHOD DTLSv1_2_method_data = { | ||
200 | .ssl_dispatch_alert = dtls1_dispatch_alert, | 180 | .ssl_dispatch_alert = dtls1_dispatch_alert, |
201 | .num_ciphers = ssl3_num_ciphers, | 181 | .num_ciphers = ssl3_num_ciphers, |
202 | .get_cipher = dtls1_get_cipher, | 182 | .get_cipher = dtls1_get_cipher, |
203 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 183 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
204 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 184 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
205 | .internal = &DTLSv1_2_method_internal_data, | 185 | .enc_flags = TLSV1_2_ENC_FLAGS, |
206 | }; | 186 | }; |
207 | 187 | ||
208 | static const SSL_METHOD_INTERNAL DTLSv1_2_client_method_internal_data = { | 188 | static const SSL_METHOD DTLSv1_2_client_method_data = { |
209 | .dtls = 1, | 189 | .dtls = 1, |
210 | .server = 0, | 190 | .server = 0, |
211 | .version = DTLS1_2_VERSION, | 191 | .version = DTLS1_2_VERSION, |
@@ -222,16 +202,12 @@ static const SSL_METHOD_INTERNAL DTLSv1_2_client_method_internal_data = { | |||
222 | .ssl_pending = ssl3_pending, | 202 | .ssl_pending = ssl3_pending, |
223 | .ssl_read_bytes = dtls1_read_bytes, | 203 | .ssl_read_bytes = dtls1_read_bytes, |
224 | .ssl_write_bytes = dtls1_write_app_data_bytes, | 204 | .ssl_write_bytes = dtls1_write_app_data_bytes, |
225 | .enc_flags = TLSV1_2_ENC_FLAGS, | ||
226 | }; | ||
227 | |||
228 | static const SSL_METHOD DTLSv1_2_client_method_data = { | ||
229 | .ssl_dispatch_alert = dtls1_dispatch_alert, | 205 | .ssl_dispatch_alert = dtls1_dispatch_alert, |
230 | .num_ciphers = ssl3_num_ciphers, | 206 | .num_ciphers = ssl3_num_ciphers, |
231 | .get_cipher = dtls1_get_cipher, | 207 | .get_cipher = dtls1_get_cipher, |
232 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 208 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
233 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 209 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
234 | .internal = &DTLSv1_2_client_method_internal_data, | 210 | .enc_flags = TLSV1_2_ENC_FLAGS, |
235 | }; | 211 | }; |
236 | 212 | ||
237 | const SSL_METHOD * | 213 | const SSL_METHOD * |
@@ -289,7 +265,7 @@ DTLS_server_method(void) | |||
289 | } | 265 | } |
290 | 266 | ||
291 | #if defined(LIBRESSL_HAS_TLS1_3_CLIENT) && defined(LIBRESSL_HAS_TLS1_3_SERVER) | 267 | #if defined(LIBRESSL_HAS_TLS1_3_CLIENT) && defined(LIBRESSL_HAS_TLS1_3_SERVER) |
292 | static const SSL_METHOD_INTERNAL TLS_method_internal_data = { | 268 | static const SSL_METHOD TLS_method_data = { |
293 | .dtls = 0, | 269 | .dtls = 0, |
294 | .server = 1, | 270 | .server = 1, |
295 | .version = TLS1_3_VERSION, | 271 | .version = TLS1_3_VERSION, |
@@ -306,20 +282,16 @@ static const SSL_METHOD_INTERNAL TLS_method_internal_data = { | |||
306 | .ssl_pending = tls13_legacy_pending, | 282 | .ssl_pending = tls13_legacy_pending, |
307 | .ssl_read_bytes = tls13_legacy_read_bytes, | 283 | .ssl_read_bytes = tls13_legacy_read_bytes, |
308 | .ssl_write_bytes = tls13_legacy_write_bytes, | 284 | .ssl_write_bytes = tls13_legacy_write_bytes, |
309 | .enc_flags = TLSV1_3_ENC_FLAGS, | ||
310 | }; | ||
311 | |||
312 | static const SSL_METHOD TLS_method_data = { | ||
313 | .ssl_dispatch_alert = ssl3_dispatch_alert, | 285 | .ssl_dispatch_alert = ssl3_dispatch_alert, |
314 | .num_ciphers = ssl3_num_ciphers, | 286 | .num_ciphers = ssl3_num_ciphers, |
315 | .get_cipher = ssl3_get_cipher, | 287 | .get_cipher = ssl3_get_cipher, |
316 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 288 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
317 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 289 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
318 | .internal = &TLS_method_internal_data, | 290 | .enc_flags = TLSV1_3_ENC_FLAGS, |
319 | }; | 291 | }; |
320 | #endif | 292 | #endif |
321 | 293 | ||
322 | static const SSL_METHOD_INTERNAL TLS_legacy_method_internal_data = { | 294 | static const SSL_METHOD TLS_legacy_method_data = { |
323 | .dtls = 0, | 295 | .dtls = 0, |
324 | .server = 1, | 296 | .server = 1, |
325 | .version = TLS1_2_VERSION, | 297 | .version = TLS1_2_VERSION, |
@@ -336,20 +308,16 @@ static const SSL_METHOD_INTERNAL TLS_legacy_method_internal_data = { | |||
336 | .ssl_pending = ssl3_pending, | 308 | .ssl_pending = ssl3_pending, |
337 | .ssl_read_bytes = ssl3_read_bytes, | 309 | .ssl_read_bytes = ssl3_read_bytes, |
338 | .ssl_write_bytes = ssl3_write_bytes, | 310 | .ssl_write_bytes = ssl3_write_bytes, |
339 | .enc_flags = TLSV1_2_ENC_FLAGS, | ||
340 | }; | ||
341 | |||
342 | static const SSL_METHOD TLS_legacy_method_data = { | ||
343 | .ssl_dispatch_alert = ssl3_dispatch_alert, | 311 | .ssl_dispatch_alert = ssl3_dispatch_alert, |
344 | .num_ciphers = ssl3_num_ciphers, | 312 | .num_ciphers = ssl3_num_ciphers, |
345 | .get_cipher = ssl3_get_cipher, | 313 | .get_cipher = ssl3_get_cipher, |
346 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 314 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
347 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 315 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
348 | .internal = &TLS_legacy_method_internal_data, | 316 | .enc_flags = TLSV1_2_ENC_FLAGS, |
349 | }; | 317 | }; |
350 | 318 | ||
351 | #if defined(LIBRESSL_HAS_TLS1_3_CLIENT) | 319 | #if defined(LIBRESSL_HAS_TLS1_3_CLIENT) |
352 | static const SSL_METHOD_INTERNAL TLS_client_method_internal_data = { | 320 | static const SSL_METHOD TLS_client_method_data = { |
353 | .dtls = 0, | 321 | .dtls = 0, |
354 | .server = 0, | 322 | .server = 0, |
355 | .version = TLS1_3_VERSION, | 323 | .version = TLS1_3_VERSION, |
@@ -366,21 +334,17 @@ static const SSL_METHOD_INTERNAL TLS_client_method_internal_data = { | |||
366 | .ssl_pending = tls13_legacy_pending, | 334 | .ssl_pending = tls13_legacy_pending, |
367 | .ssl_read_bytes = tls13_legacy_read_bytes, | 335 | .ssl_read_bytes = tls13_legacy_read_bytes, |
368 | .ssl_write_bytes = tls13_legacy_write_bytes, | 336 | .ssl_write_bytes = tls13_legacy_write_bytes, |
369 | .enc_flags = TLSV1_3_ENC_FLAGS, | ||
370 | }; | ||
371 | |||
372 | static const SSL_METHOD TLS_client_method_data = { | ||
373 | .ssl_dispatch_alert = ssl3_dispatch_alert, | 337 | .ssl_dispatch_alert = ssl3_dispatch_alert, |
374 | .num_ciphers = ssl3_num_ciphers, | 338 | .num_ciphers = ssl3_num_ciphers, |
375 | .get_cipher = ssl3_get_cipher, | 339 | .get_cipher = ssl3_get_cipher, |
376 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 340 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
377 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 341 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
378 | .internal = &TLS_client_method_internal_data, | 342 | .enc_flags = TLSV1_3_ENC_FLAGS, |
379 | }; | 343 | }; |
380 | 344 | ||
381 | #else | 345 | #else |
382 | 346 | ||
383 | static const SSL_METHOD_INTERNAL TLS_legacy_client_method_internal_data = { | 347 | static const SSL_METHOD TLS_legacy_client_method_data = { |
384 | .dtls = 0, | 348 | .dtls = 0, |
385 | .server = 0, | 349 | .server = 0, |
386 | .version = TLS1_2_VERSION, | 350 | .version = TLS1_2_VERSION, |
@@ -397,20 +361,16 @@ static const SSL_METHOD_INTERNAL TLS_legacy_client_method_internal_data = { | |||
397 | .ssl_pending = ssl3_pending, | 361 | .ssl_pending = ssl3_pending, |
398 | .ssl_read_bytes = ssl3_read_bytes, | 362 | .ssl_read_bytes = ssl3_read_bytes, |
399 | .ssl_write_bytes = ssl3_write_bytes, | 363 | .ssl_write_bytes = ssl3_write_bytes, |
400 | .enc_flags = TLSV1_2_ENC_FLAGS, | ||
401 | }; | ||
402 | |||
403 | static const SSL_METHOD TLS_legacy_client_method_data = { | ||
404 | .ssl_dispatch_alert = ssl3_dispatch_alert, | 364 | .ssl_dispatch_alert = ssl3_dispatch_alert, |
405 | .num_ciphers = ssl3_num_ciphers, | 365 | .num_ciphers = ssl3_num_ciphers, |
406 | .get_cipher = ssl3_get_cipher, | 366 | .get_cipher = ssl3_get_cipher, |
407 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 367 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
408 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 368 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
409 | .internal = &TLS_legacy_client_method_internal_data, | 369 | .enc_flags = TLSV1_2_ENC_FLAGS, |
410 | }; | 370 | }; |
411 | #endif | 371 | #endif |
412 | 372 | ||
413 | static const SSL_METHOD_INTERNAL TLSv1_method_internal_data = { | 373 | static const SSL_METHOD TLSv1_method_data = { |
414 | .dtls = 0, | 374 | .dtls = 0, |
415 | .server = 1, | 375 | .server = 1, |
416 | .version = TLS1_VERSION, | 376 | .version = TLS1_VERSION, |
@@ -427,19 +387,15 @@ static const SSL_METHOD_INTERNAL TLSv1_method_internal_data = { | |||
427 | .ssl_pending = ssl3_pending, | 387 | .ssl_pending = ssl3_pending, |
428 | .ssl_read_bytes = ssl3_read_bytes, | 388 | .ssl_read_bytes = ssl3_read_bytes, |
429 | .ssl_write_bytes = ssl3_write_bytes, | 389 | .ssl_write_bytes = ssl3_write_bytes, |
430 | .enc_flags = TLSV1_ENC_FLAGS, | ||
431 | }; | ||
432 | |||
433 | static const SSL_METHOD TLSv1_method_data = { | ||
434 | .ssl_dispatch_alert = ssl3_dispatch_alert, | 390 | .ssl_dispatch_alert = ssl3_dispatch_alert, |
435 | .num_ciphers = ssl3_num_ciphers, | 391 | .num_ciphers = ssl3_num_ciphers, |
436 | .get_cipher = ssl3_get_cipher, | 392 | .get_cipher = ssl3_get_cipher, |
437 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 393 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
438 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 394 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
439 | .internal = &TLSv1_method_internal_data, | 395 | .enc_flags = TLSV1_ENC_FLAGS, |
440 | }; | 396 | }; |
441 | 397 | ||
442 | static const SSL_METHOD_INTERNAL TLSv1_client_method_internal_data = { | 398 | static const SSL_METHOD TLSv1_client_method_data = { |
443 | .dtls = 0, | 399 | .dtls = 0, |
444 | .server = 0, | 400 | .server = 0, |
445 | .version = TLS1_VERSION, | 401 | .version = TLS1_VERSION, |
@@ -456,19 +412,15 @@ static const SSL_METHOD_INTERNAL TLSv1_client_method_internal_data = { | |||
456 | .ssl_pending = ssl3_pending, | 412 | .ssl_pending = ssl3_pending, |
457 | .ssl_read_bytes = ssl3_read_bytes, | 413 | .ssl_read_bytes = ssl3_read_bytes, |
458 | .ssl_write_bytes = ssl3_write_bytes, | 414 | .ssl_write_bytes = ssl3_write_bytes, |
459 | .enc_flags = TLSV1_ENC_FLAGS, | ||
460 | }; | ||
461 | |||
462 | static const SSL_METHOD TLSv1_client_method_data = { | ||
463 | .ssl_dispatch_alert = ssl3_dispatch_alert, | 415 | .ssl_dispatch_alert = ssl3_dispatch_alert, |
464 | .num_ciphers = ssl3_num_ciphers, | 416 | .num_ciphers = ssl3_num_ciphers, |
465 | .get_cipher = ssl3_get_cipher, | 417 | .get_cipher = ssl3_get_cipher, |
466 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 418 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
467 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 419 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
468 | .internal = &TLSv1_client_method_internal_data, | 420 | .enc_flags = TLSV1_ENC_FLAGS, |
469 | }; | 421 | }; |
470 | 422 | ||
471 | static const SSL_METHOD_INTERNAL TLSv1_1_method_internal_data = { | 423 | static const SSL_METHOD TLSv1_1_method_data = { |
472 | .dtls = 0, | 424 | .dtls = 0, |
473 | .server = 1, | 425 | .server = 1, |
474 | .version = TLS1_1_VERSION, | 426 | .version = TLS1_1_VERSION, |
@@ -485,19 +437,15 @@ static const SSL_METHOD_INTERNAL TLSv1_1_method_internal_data = { | |||
485 | .ssl_pending = ssl3_pending, | 437 | .ssl_pending = ssl3_pending, |
486 | .ssl_read_bytes = ssl3_read_bytes, | 438 | .ssl_read_bytes = ssl3_read_bytes, |
487 | .ssl_write_bytes = ssl3_write_bytes, | 439 | .ssl_write_bytes = ssl3_write_bytes, |
488 | .enc_flags = TLSV1_1_ENC_FLAGS, | ||
489 | }; | ||
490 | |||
491 | static const SSL_METHOD TLSv1_1_method_data = { | ||
492 | .ssl_dispatch_alert = ssl3_dispatch_alert, | 440 | .ssl_dispatch_alert = ssl3_dispatch_alert, |
493 | .num_ciphers = ssl3_num_ciphers, | 441 | .num_ciphers = ssl3_num_ciphers, |
494 | .get_cipher = ssl3_get_cipher, | 442 | .get_cipher = ssl3_get_cipher, |
495 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 443 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
496 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 444 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
497 | .internal = &TLSv1_1_method_internal_data, | 445 | .enc_flags = TLSV1_1_ENC_FLAGS, |
498 | }; | 446 | }; |
499 | 447 | ||
500 | static const SSL_METHOD_INTERNAL TLSv1_1_client_method_internal_data = { | 448 | static const SSL_METHOD TLSv1_1_client_method_data = { |
501 | .dtls = 0, | 449 | .dtls = 0, |
502 | .server = 0, | 450 | .server = 0, |
503 | .version = TLS1_1_VERSION, | 451 | .version = TLS1_1_VERSION, |
@@ -514,19 +462,15 @@ static const SSL_METHOD_INTERNAL TLSv1_1_client_method_internal_data = { | |||
514 | .ssl_pending = ssl3_pending, | 462 | .ssl_pending = ssl3_pending, |
515 | .ssl_read_bytes = ssl3_read_bytes, | 463 | .ssl_read_bytes = ssl3_read_bytes, |
516 | .ssl_write_bytes = ssl3_write_bytes, | 464 | .ssl_write_bytes = ssl3_write_bytes, |
517 | .enc_flags = TLSV1_1_ENC_FLAGS, | ||
518 | }; | ||
519 | |||
520 | static const SSL_METHOD TLSv1_1_client_method_data = { | ||
521 | .ssl_dispatch_alert = ssl3_dispatch_alert, | 465 | .ssl_dispatch_alert = ssl3_dispatch_alert, |
522 | .num_ciphers = ssl3_num_ciphers, | 466 | .num_ciphers = ssl3_num_ciphers, |
523 | .get_cipher = ssl3_get_cipher, | 467 | .get_cipher = ssl3_get_cipher, |
524 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 468 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
525 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 469 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
526 | .internal = &TLSv1_1_client_method_internal_data, | 470 | .enc_flags = TLSV1_1_ENC_FLAGS, |
527 | }; | 471 | }; |
528 | 472 | ||
529 | static const SSL_METHOD_INTERNAL TLSv1_2_method_internal_data = { | 473 | static const SSL_METHOD TLSv1_2_method_data = { |
530 | .dtls = 0, | 474 | .dtls = 0, |
531 | .server = 1, | 475 | .server = 1, |
532 | .version = TLS1_2_VERSION, | 476 | .version = TLS1_2_VERSION, |
@@ -543,19 +487,15 @@ static const SSL_METHOD_INTERNAL TLSv1_2_method_internal_data = { | |||
543 | .ssl_pending = ssl3_pending, | 487 | .ssl_pending = ssl3_pending, |
544 | .ssl_read_bytes = ssl3_read_bytes, | 488 | .ssl_read_bytes = ssl3_read_bytes, |
545 | .ssl_write_bytes = ssl3_write_bytes, | 489 | .ssl_write_bytes = ssl3_write_bytes, |
546 | .enc_flags = TLSV1_2_ENC_FLAGS, | ||
547 | }; | ||
548 | |||
549 | static const SSL_METHOD TLSv1_2_method_data = { | ||
550 | .ssl_dispatch_alert = ssl3_dispatch_alert, | 490 | .ssl_dispatch_alert = ssl3_dispatch_alert, |
551 | .num_ciphers = ssl3_num_ciphers, | 491 | .num_ciphers = ssl3_num_ciphers, |
552 | .get_cipher = ssl3_get_cipher, | 492 | .get_cipher = ssl3_get_cipher, |
553 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 493 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
554 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 494 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
555 | .internal = &TLSv1_2_method_internal_data, | 495 | .enc_flags = TLSV1_2_ENC_FLAGS, |
556 | }; | 496 | }; |
557 | 497 | ||
558 | static const SSL_METHOD_INTERNAL TLSv1_2_client_method_internal_data = { | 498 | static const SSL_METHOD TLSv1_2_client_method_data = { |
559 | .dtls = 0, | 499 | .dtls = 0, |
560 | .server = 0, | 500 | .server = 0, |
561 | .version = TLS1_2_VERSION, | 501 | .version = TLS1_2_VERSION, |
@@ -572,16 +512,12 @@ static const SSL_METHOD_INTERNAL TLSv1_2_client_method_internal_data = { | |||
572 | .ssl_pending = ssl3_pending, | 512 | .ssl_pending = ssl3_pending, |
573 | .ssl_read_bytes = ssl3_read_bytes, | 513 | .ssl_read_bytes = ssl3_read_bytes, |
574 | .ssl_write_bytes = ssl3_write_bytes, | 514 | .ssl_write_bytes = ssl3_write_bytes, |
575 | .enc_flags = TLSV1_2_ENC_FLAGS, | ||
576 | }; | ||
577 | |||
578 | static const SSL_METHOD TLSv1_2_client_method_data = { | ||
579 | .ssl_dispatch_alert = ssl3_dispatch_alert, | 515 | .ssl_dispatch_alert = ssl3_dispatch_alert, |
580 | .num_ciphers = ssl3_num_ciphers, | 516 | .num_ciphers = ssl3_num_ciphers, |
581 | .get_cipher = ssl3_get_cipher, | 517 | .get_cipher = ssl3_get_cipher, |
582 | .get_cipher_by_char = ssl3_get_cipher_by_char, | 518 | .get_cipher_by_char = ssl3_get_cipher_by_char, |
583 | .put_cipher_by_char = ssl3_put_cipher_by_char, | 519 | .put_cipher_by_char = ssl3_put_cipher_by_char, |
584 | .internal = &TLSv1_2_client_method_internal_data, | 520 | .enc_flags = TLSV1_2_ENC_FLAGS, |
585 | }; | 521 | }; |
586 | 522 | ||
587 | const SSL_METHOD * | 523 | const SSL_METHOD * |