diff options
author | tb <> | 2024-07-09 17:29:51 +0000 |
---|---|---|
committer | tb <> | 2024-07-09 17:29:51 +0000 |
commit | 3e2b5db005df2af699a2dc06fd7f65ee7264bf8c (patch) | |
tree | 300ae6e03d334d3193e0a2258266107ddbe74591 /src/lib/libcrypto/kdf/tls1_prf.c | |
parent | 5abae30b0971022196f18c7381dcf32a77144295 (diff) | |
download | openbsd-3e2b5db005df2af699a2dc06fd7f65ee7264bf8c.tar.gz openbsd-3e2b5db005df2af699a2dc06fd7f65ee7264bf8c.tar.bz2 openbsd-3e2b5db005df2af699a2dc06fd7f65ee7264bf8c.zip |
Replace explicit_bzero() plus free() with freezero()
This is simpler, if slightly more expensive
Diffstat (limited to 'src/lib/libcrypto/kdf/tls1_prf.c')
-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 |