From e04ca894aa08b4b01dbc7ead7524d8026ce8f3be Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sun, 5 Mar 2017 14:39:53 +0000 Subject: Provide a rolling handshake hash that commences as soon as the cipher suite has been selected, and convert the final finish MAC to use this handshake hash. This is a first step towards cleaning up the current handshake buffer/digest code. ok beck@ inoguchi@ --- src/lib/libssl/s3_lib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/lib/libssl/s3_lib.c') diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 3f09834ab1..d6bf6a4574 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: s3_lib.c,v 1.136 2017/03/04 16:32:00 jsing Exp $ */ +/* $OpenBSD: s3_lib.c,v 1.137 2017/03/05 14:39:53 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1839,8 +1839,12 @@ ssl3_free(SSL *s) free(S3I(s)->tmp.x25519); sk_X509_NAME_pop_free(S3I(s)->tmp.ca_names, X509_NAME_free); + BIO_free(S3I(s)->handshake_buffer); + tls1_free_digest_list(s); + tls1_handshake_hash_free(s); + free(S3I(s)->alpn_selected); explicit_bzero(S3I(s), sizeof(*S3I(s))); @@ -1881,6 +1885,7 @@ ssl3_clear(SSL *s) S3I(s)->handshake_buffer = NULL; tls1_free_digest_list(s); + tls1_handshake_hash_free(s); free(S3I(s)->alpn_selected); S3I(s)->alpn_selected = NULL; -- cgit v1.2.3-55-g6feb