summaryrefslogtreecommitdiffstats
path: root/lib/libssl/s3_lib.c
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2019-01-24 15:50:47 +0000
committerbeck <beck@openbsd.org>2019-01-24 15:50:47 +0000
commit3dd0b9bc5c8fb1cd4e4f37491d6800cb07a7e702 (patch)
tree17034f99b8ac03510356e0a6a52c4de5a847ee92 /lib/libssl/s3_lib.c
parentFix a bunch of shadow and missing prototype compiler warnings. (diff)
downloadwireguard-openbsd-3dd0b9bc5c8fb1cd4e4f37491d6800cb07a7e702.tar.xz
wireguard-openbsd-3dd0b9bc5c8fb1cd4e4f37491d6800cb07a7e702.zip
Set pointer variables in tls13 handshake to NULL on clear
ok jsing@ bcook@
Diffstat (limited to 'lib/libssl/s3_lib.c')
-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;