summaryrefslogtreecommitdiffstats
path: root/lib/libssl/s3_lib.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2017-04-10 17:27:33 +0000
committerjsing <jsing@openbsd.org>2017-04-10 17:27:33 +0000
commit8f2be08bb3450546a0413c2e8cd4b1a35d4a494b (patch)
tree6a8fda912943265174b2e47fd95da358ef6e882e /lib/libssl/s3_lib.c
parentUse freezero() for X25519 keys - same result with more readable code. (diff)
downloadwireguard-openbsd-8f2be08bb3450546a0413c2e8cd4b1a35d4a494b.tar.xz
wireguard-openbsd-8f2be08bb3450546a0413c2e8cd4b1a35d4a494b.zip
Use freezero() for the internal opaque structures, instead of the current
explicit_bzero()/free(). Less code and potentially less overhead.
Diffstat (limited to 'lib/libssl/s3_lib.c')
-rw-r--r--lib/libssl/s3_lib.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/libssl/s3_lib.c b/lib/libssl/s3_lib.c
index 1fd077ec6e1..d4142e743fc 100644
--- a/lib/libssl/s3_lib.c
+++ b/lib/libssl/s3_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_lib.c,v 1.139 2017/04/10 17:25:22 jsing Exp $ */
+/* $OpenBSD: s3_lib.c,v 1.140 2017/04/10 17:27:33 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1844,11 +1844,8 @@ ssl3_free(SSL *s)
free(S3I(s)->alpn_selected);
- explicit_bzero(S3I(s), sizeof(*S3I(s)));
- free(S3I(s));
-
- explicit_bzero(s->s3, sizeof(*s->s3));
- free(s->s3);
+ freezero(S3I(s), sizeof(*S3I(s)));
+ freezero(s->s3, sizeof(*s->s3));
s->s3 = NULL;
}