diff options
| author | tb <> | 2024-07-09 17:29:51 +0000 |
|---|---|---|
| committer | tb <> | 2024-07-09 17:29:51 +0000 |
| commit | 1ae474686a2b8e89a293775cf856012d552bb8ac (patch) | |
| tree | 300ae6e03d334d3193e0a2258266107ddbe74591 /src | |
| parent | 8ca4b6f157d7bf33b11e29f902f0b0cb7944c85b (diff) | |
| download | openbsd-1ae474686a2b8e89a293775cf856012d552bb8ac.tar.gz openbsd-1ae474686a2b8e89a293775cf856012d552bb8ac.tar.bz2 openbsd-1ae474686a2b8e89a293775cf856012d552bb8ac.zip | |
Replace explicit_bzero() plus free() with freezero()
This is simpler, if slightly more expensive
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/kdf/tls1_prf.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libcrypto/kdf/tls1_prf.c b/src/lib/libcrypto/kdf/tls1_prf.c index ab21644d7a..7f6939adda 100644 --- a/src/lib/libcrypto/kdf/tls1_prf.c +++ b/src/lib/libcrypto/kdf/tls1_prf.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls1_prf.c,v 1.32 2024/07/09 17:05:46 tb Exp $ */ | 1 | /* $OpenBSD: tls1_prf.c,v 1.33 2024/07/09 17:29:51 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project |
| 4 | * 2016. | 4 | * 2016. |
| @@ -97,8 +97,7 @@ pkey_tls1_prf_cleanup(EVP_PKEY_CTX *ctx) | |||
| 97 | struct tls1_prf_ctx *kctx = ctx->data; | 97 | struct tls1_prf_ctx *kctx = ctx->data; |
| 98 | 98 | ||
| 99 | freezero(kctx->secret, kctx->secret_len); | 99 | freezero(kctx->secret, kctx->secret_len); |
| 100 | explicit_bzero(kctx->seed, kctx->seed_len); | 100 | freezero(kctx, sizeof(*kctx)); |
| 101 | free(kctx); | ||
| 102 | } | 101 | } |
| 103 | 102 | ||
| 104 | static int | 103 | static int |
