summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2021-04-19 17:03:39 +0000
committerjsing <>2021-04-19 17:03:39 +0000
commitd3ea176e147145d3bbf57b91913d656b07ae80ef (patch)
tree3105db318462fcbb99d9aab5d2dcc61feedc6bbf /src
parentc80ec6c0289d29bb4c9a0250b49a487f3eead897 (diff)
downloadopenbsd-d3ea176e147145d3bbf57b91913d656b07ae80ef.tar.gz
openbsd-d3ea176e147145d3bbf57b91913d656b07ae80ef.tar.bz2
openbsd-d3ea176e147145d3bbf57b91913d656b07ae80ef.zip
Move new_mac_secret_size into the TLSv1.2 handshake struct.
Drop the 'new_' prefix in the process. ok inoguchi@ tb@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/ssl_locl.h6
-rw-r--r--src/lib/libssl/t1_enc.c6
2 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h
index 3b86f5874b..f5287b2580 100644
--- a/src/lib/libssl/ssl_locl.h
+++ b/src/lib/libssl/ssl_locl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_locl.h,v 1.334 2021/04/19 16:51:56 jsing Exp $ */ 1/* $OpenBSD: ssl_locl.h,v 1.335 2021/04/19 17:03: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 *
@@ -427,6 +427,9 @@ typedef struct ssl_handshake_tls12_st {
427 /* Reuse current handshake message. */ 427 /* Reuse current handshake message. */
428 int reuse_message; 428 int reuse_message;
429 429
430 /* Size of the MAC secret. */
431 int mac_secret_size;
432
430 /* Record-layer key block for TLS 1.2 and earlier. */ 433 /* Record-layer key block for TLS 1.2 and earlier. */
431 unsigned char *key_block; 434 unsigned char *key_block;
432 size_t key_block_len; 435 size_t key_block_len;
@@ -950,7 +953,6 @@ typedef struct ssl3_state_internal_st {
950 953
951 const EVP_CIPHER *new_sym_enc; 954 const EVP_CIPHER *new_sym_enc;
952 const EVP_AEAD *new_aead; 955 const EVP_AEAD *new_aead;
953 int new_mac_secret_size;
954 956
955 int cert_request; 957 int cert_request;
956 } tmp; 958 } tmp;
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c
index 0ddd52b530..613eb4cf18 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.136 2021/03/29 16:19:15 jsing Exp $ */ 1/* $OpenBSD: t1_enc.c,v 1.137 2021/04/19 17:03: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 *
@@ -338,7 +338,7 @@ tls1_change_cipher_state(SSL *s, int which)
338 iv_len = EVP_CIPHER_iv_length(cipher); 338 iv_len = EVP_CIPHER_iv_length(cipher);
339 } 339 }
340 340
341 mac_secret_size = S3I(s)->tmp.new_mac_secret_size; 341 mac_secret_size = S3I(s)->hs.tls12.mac_secret_size;
342 342
343 key_block = S3I(s)->hs.tls12.key_block; 343 key_block = S3I(s)->hs.tls12.key_block;
344 client_write_mac_secret = key_block; 344 client_write_mac_secret = key_block;
@@ -426,7 +426,7 @@ tls1_setup_key_block(SSL *s)
426 426
427 S3I(s)->tmp.new_aead = aead; 427 S3I(s)->tmp.new_aead = aead;
428 S3I(s)->tmp.new_sym_enc = cipher; 428 S3I(s)->tmp.new_sym_enc = cipher;
429 S3I(s)->tmp.new_mac_secret_size = mac_secret_size; 429 S3I(s)->hs.tls12.mac_secret_size = mac_secret_size;
430 430
431 tls12_record_layer_set_aead(s->internal->rl, aead); 431 tls12_record_layer_set_aead(s->internal->rl, aead);
432 tls12_record_layer_set_cipher_hash(s->internal->rl, cipher, 432 tls12_record_layer_set_cipher_hash(s->internal->rl, cipher,