summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2019-01-24 15:50:48 +0000
committerBob Beck <beck@cvs.openbsd.org>2019-01-24 15:50:48 +0000
commitf7ba6d56f2549cb293706aae8a7276cf0b7acb38 (patch)
treec2a430968c648880de208671ce5725b74deb64d2
parentbf12fddba2b3418f5675decb83852a40d13773db (diff)
Set pointer variables in tls13 handshake to NULL on clear
ok jsing@ bcook@
-rw-r--r--lib/libssl/s3_lib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libssl/s3_lib.c b/lib/libssl/s3_lib.c
index 6e4e8eb1d30..b7d87268abc 100644
--- a/lib/libssl/s3_lib.c
+++ b/lib/libssl/s3_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_lib.c,v 1.182 2019/01/24 02:56:41 beck Exp $ */
+/* $OpenBSD: s3_lib.c,v 1.183 2019/01/24 15:50:47 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1603,9 +1603,13 @@ ssl3_clear(SSL *s)
S3I(s)->tmp.x25519 = NULL;
tls13_secrets_destroy(S3I(s)->hs_tls13.secrets);
+ S3I(s)->hs_tls13.secrets = NULL;
freezero(S3I(s)->hs_tls13.x25519_private, X25519_KEY_LENGTH);
+ S3I(s)->hs_tls13.x25519_private = NULL;
freezero(S3I(s)->hs_tls13.x25519_public, X25519_KEY_LENGTH);
+ S3I(s)->hs_tls13.x25519_public = NULL;
freezero(S3I(s)->hs_tls13.x25519_peer_public, X25519_KEY_LENGTH);
+ S3I(s)->hs_tls13.x25519_peer_public = NULL;
freezero(S3I(s)->hs_tls13.cookie, S3I(s)->hs_tls13.cookie_len);
S3I(s)->hs_tls13.cookie = NULL;
S3I(s)->hs_tls13.cookie_len = 0;