summaryrefslogtreecommitdiff
path: root/lib/libssl
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2015-09-12 12:17:01 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2015-09-12 12:17:01 +0000
commit6796112b524df6dccfcda541986b0f5730163769 (patch)
treedc326e3d3f0f1a9ce0c7c82a659b65c8a809480a /lib/libssl
parent479670319d2ccf3fafe399f1b7abc2c5ee99b943 (diff)
Use explicit_bzero() instead of memset() when clearing private keys.
ok bcook@ beck@ miod@
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/s3_clnt.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libssl/s3_clnt.c b/lib/libssl/s3_clnt.c
index c2da4289559..12677319ccd 100644
--- a/lib/libssl/s3_clnt.c
+++ b/lib/libssl/s3_clnt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: s3_clnt.c,v 1.129 2015/09/12 10:25:38 jsing Exp $ */
+/* $OpenBSD: s3_clnt.c,v 1.130 2015/09/12 12:17:00 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1978,7 +1978,7 @@ ssl3_send_client_key_exchange(SSL *s)
s->session->master_key, p, n);
/* Clean up. */
- memset(p, 0, n);
+ explicit_bzero(p, n);
/* Send off the data. */
n = BN_num_bytes(dh_clnt->pub_key);
@@ -2071,7 +2071,8 @@ ssl3_send_client_key_exchange(SSL *s)
s->method->ssl3_enc->generate_master_secret(s,
s->session->master_key, p, n);
- memset(p, 0, n); /* clean up */
+ /* Clean up. */
+ explicit_bzero(p, n);
/*
* First check the size of encoding and