diff options
| author | tim <> | 2019-11-21 20:01:06 +0000 |
|---|---|---|
| committer | tim <> | 2019-11-21 20:01:06 +0000 |
| commit | c14b9e828cc52dc3c70e4cfb8cbe41e6d5f6a7ba (patch) | |
| tree | 872bc793553bce45860f74d7e9a55e7cbb1b756b | |
| parent | c8e4e0dd743890730bad0c188b6c3c8f875e4f34 (diff) | |
| download | openbsd-c14b9e828cc52dc3c70e4cfb8cbe41e6d5f6a7ba.tar.gz openbsd-c14b9e828cc52dc3c70e4cfb8cbe41e6d5f6a7ba.tar.bz2 openbsd-c14b9e828cc52dc3c70e4cfb8cbe41e6d5f6a7ba.zip | |
Use explicit_bzero() to clear key material
OK tb@ tedu@
Diffstat (limited to '')
| -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; |
