diff options
author | jsing <> | 2022-02-05 14:54:10 +0000 |
---|---|---|
committer | jsing <> | 2022-02-05 14:54:10 +0000 |
commit | 83e485da0e6d59ae7baf4be882b7d2a569774e84 (patch) | |
tree | da7fe094101bf3711667cf1650e3c6f57a50e2ff /src/lib/libssl/t1_enc.c | |
parent | a97d9e9ca8287d1d19559ab919f71b5c5771caeb (diff) | |
download | openbsd-83e485da0e6d59ae7baf4be882b7d2a569774e84.tar.gz openbsd-83e485da0e6d59ae7baf4be882b7d2a569774e84.tar.bz2 openbsd-83e485da0e6d59ae7baf4be882b7d2a569774e84.zip |
Bye bye S3I.
S3I has served us well, however now that libssl is fully opaque it is time
to say goodbye. Aside from removing the calloc/free/memset, the rest is
mechanical sed.
ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/t1_enc.c')
-rw-r--r-- | src/lib/libssl/t1_enc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c index a63da9c263..c996159a47 100644 --- a/src/lib/libssl/t1_enc.c +++ b/src/lib/libssl/t1_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: t1_enc.c,v 1.153 2021/12/09 17:54:41 tb Exp $ */ | 1 | /* $OpenBSD: t1_enc.c,v 1.154 2022/02/05 14:54:10 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 | * |
@@ -149,8 +149,8 @@ | |||
149 | void | 149 | void |
150 | tls1_cleanup_key_block(SSL *s) | 150 | tls1_cleanup_key_block(SSL *s) |
151 | { | 151 | { |
152 | tls12_key_block_free(S3I(s)->hs.tls12.key_block); | 152 | tls12_key_block_free(s->s3->hs.tls12.key_block); |
153 | S3I(s)->hs.tls12.key_block = NULL; | 153 | s->s3->hs.tls12.key_block = NULL; |
154 | } | 154 | } |
155 | 155 | ||
156 | /* | 156 | /* |
@@ -303,10 +303,10 @@ tls1_change_cipher_state(SSL *s, int is_write) | |||
303 | 303 | ||
304 | /* Use client write keys on client write and server read. */ | 304 | /* Use client write keys on client write and server read. */ |
305 | if ((!s->server && is_write) || (s->server && !is_write)) { | 305 | if ((!s->server && is_write) || (s->server && !is_write)) { |
306 | tls12_key_block_client_write(S3I(s)->hs.tls12.key_block, | 306 | tls12_key_block_client_write(s->s3->hs.tls12.key_block, |
307 | &mac_key, &key, &iv); | 307 | &mac_key, &key, &iv); |
308 | } else { | 308 | } else { |
309 | tls12_key_block_server_write(S3I(s)->hs.tls12.key_block, | 309 | tls12_key_block_server_write(s->s3->hs.tls12.key_block, |
310 | &mac_key, &key, &iv); | 310 | &mac_key, &key, &iv); |
311 | } | 311 | } |
312 | 312 | ||
@@ -354,7 +354,7 @@ tls1_setup_key_block(SSL *s) | |||
354 | * XXX - callers should be changed so that they only call this | 354 | * XXX - callers should be changed so that they only call this |
355 | * function once. | 355 | * function once. |
356 | */ | 356 | */ |
357 | if (S3I(s)->hs.tls12.key_block != NULL) | 357 | if (s->s3->hs.tls12.key_block != NULL) |
358 | return (1); | 358 | return (1); |
359 | 359 | ||
360 | if (s->session->cipher && | 360 | if (s->session->cipher && |
@@ -384,7 +384,7 @@ tls1_setup_key_block(SSL *s) | |||
384 | if (!tls12_key_block_generate(key_block, s, aead, cipher, mac_hash)) | 384 | if (!tls12_key_block_generate(key_block, s, aead, cipher, mac_hash)) |
385 | goto err; | 385 | goto err; |
386 | 386 | ||
387 | S3I(s)->hs.tls12.key_block = key_block; | 387 | s->s3->hs.tls12.key_block = key_block; |
388 | key_block = NULL; | 388 | key_block = NULL; |
389 | 389 | ||
390 | if (!(s->internal->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) && | 390 | if (!(s->internal->options & SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) && |
@@ -393,15 +393,15 @@ tls1_setup_key_block(SSL *s) | |||
393 | * Enable vulnerability countermeasure for CBC ciphers with | 393 | * Enable vulnerability countermeasure for CBC ciphers with |
394 | * known-IV problem (http://www.openssl.org/~bodo/tls-cbc.txt) | 394 | * known-IV problem (http://www.openssl.org/~bodo/tls-cbc.txt) |
395 | */ | 395 | */ |
396 | S3I(s)->need_empty_fragments = 1; | 396 | s->s3->need_empty_fragments = 1; |
397 | 397 | ||
398 | if (s->session->cipher != NULL) { | 398 | if (s->session->cipher != NULL) { |
399 | if (s->session->cipher->algorithm_enc == SSL_eNULL) | 399 | if (s->session->cipher->algorithm_enc == SSL_eNULL) |
400 | S3I(s)->need_empty_fragments = 0; | 400 | s->s3->need_empty_fragments = 0; |
401 | 401 | ||
402 | #ifndef OPENSSL_NO_RC4 | 402 | #ifndef OPENSSL_NO_RC4 |
403 | if (s->session->cipher->algorithm_enc == SSL_RC4) | 403 | if (s->session->cipher->algorithm_enc == SSL_RC4) |
404 | S3I(s)->need_empty_fragments = 0; | 404 | s->s3->need_empty_fragments = 0; |
405 | #endif | 405 | #endif |
406 | } | 406 | } |
407 | } | 407 | } |