diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2016-12-07 13:17:34 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2016-12-07 13:17:34 +0000 |
commit | ed253b6069ec60991c902327453e5e193016af47 (patch) | |
tree | 76fd4b36dc5fd881b72c68ed9b318b55836006fe /lib/libssl/ssl_asn1.c | |
parent | 62525b0bdf259ac858b2b090d001961668021d92 (diff) |
Ensure that we zero memory used to hold the ASN.1 encoded session, since
this contains the session master key.
ok deraadt@ doug@
Diffstat (limited to 'lib/libssl/ssl_asn1.c')
-rw-r--r-- | lib/libssl/ssl_asn1.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libssl/ssl_asn1.c b/lib/libssl/ssl_asn1.c index 1b938868685..a27858c955a 100644 --- a/lib/libssl/ssl_asn1.c +++ b/lib/libssl/ssl_asn1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_asn1.c,v 1.44 2016/12/03 12:34:35 jsing Exp $ */ +/* $OpenBSD: ssl_asn1.c,v 1.45 2016/12/07 13:17:33 jsing Exp $ */ /* * Copyright (c) 2016 Joel Sing <jsing@openbsd.org> @@ -206,6 +206,9 @@ i2d_SSL_SESSION(SSL_SESSION *s, unsigned char **pp) rv = (int)data_len; err: + if (data != NULL) + explicit_bzero(data, data_len); + CBB_cleanup(&session); free(peer_cert_bytes); free(data); |