diff options
author | tim <> | 2019-11-21 20:01:06 +0000 |
---|---|---|
committer | tim <> | 2019-11-21 20:01:06 +0000 |
commit | 0bdd867641c3ea3d68538d13cab621114d85493f (patch) | |
tree | 872bc793553bce45860f74d7e9a55e7cbb1b756b | |
parent | f3053a044b26a9a6c7c7edb6783003483d758112 (diff) | |
download | openbsd-0bdd867641c3ea3d68538d13cab621114d85493f.tar.gz openbsd-0bdd867641c3ea3d68538d13cab621114d85493f.tar.bz2 openbsd-0bdd867641c3ea3d68538d13cab621114d85493f.zip |
Use explicit_bzero() to clear key material
OK tb@ tedu@
-rw-r--r-- | src/lib/libcrypto/hkdf/hkdf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/hkdf/hkdf.c b/src/lib/libcrypto/hkdf/hkdf.c index fa1dfeb067..2327bdf625 100644 --- a/src/lib/libcrypto/hkdf/hkdf.c +++ b/src/lib/libcrypto/hkdf/hkdf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: hkdf.c,v 1.2 2018/04/03 13:33:53 tb Exp $ */ | 1 | /* $OpenBSD: hkdf.c,v 1.3 2019/11/21 20:01:06 tim Exp $ */ |
2 | /* Copyright (c) 2014, Google Inc. | 2 | /* Copyright (c) 2014, Google Inc. |
3 | * | 3 | * |
4 | * Permission to use, copy, modify, and/or distribute this software for any | 4 | * Permission to use, copy, modify, and/or distribute this software for any |
@@ -111,6 +111,7 @@ HKDF_expand(uint8_t *out_key, size_t out_len, | |||
111 | 111 | ||
112 | out: | 112 | out: |
113 | HMAC_CTX_cleanup(&hmac); | 113 | HMAC_CTX_cleanup(&hmac); |
114 | explicit_bzero(previous, sizeof(previous)); | ||
114 | if (ret != 1) | 115 | if (ret != 1) |
115 | CRYPTOerror(ERR_R_CRYPTO_LIB); | 116 | CRYPTOerror(ERR_R_CRYPTO_LIB); |
116 | return ret; | 117 | return ret; |