diff options
author | 2015-09-12 12:17:00 +0000 | |
---|---|---|
committer | 2015-09-12 12:17:00 +0000 | |
commit | b7e8eb0ddbbc9b084eead7e839dcd5a0af9f8e8f (patch) | |
tree | 3b7d21649e896ec0c5d526e154b55702738f6dfe /lib/libssl/src | |
parent | Old diff found in my tree: Add HISTORY; info from the CSRG CDs. (diff) | |
download | wireguard-openbsd-b7e8eb0ddbbc9b084eead7e839dcd5a0af9f8e8f.tar.xz wireguard-openbsd-b7e8eb0ddbbc9b084eead7e839dcd5a0af9f8e8f.zip |
Use explicit_bzero() instead of memset() when clearing private keys.
ok bcook@ beck@ miod@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/ssl/s3_clnt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libssl/src/ssl/s3_clnt.c b/lib/libssl/src/ssl/s3_clnt.c index c2da4289559..12677319ccd 100644 --- a/lib/libssl/src/ssl/s3_clnt.c +++ b/lib/libssl/src/ssl/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 |