summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/kdf/tls1_prf.c
diff options
context:
space:
mode:
authortb <>2024-07-09 17:29:51 +0000
committertb <>2024-07-09 17:29:51 +0000
commit3e2b5db005df2af699a2dc06fd7f65ee7264bf8c (patch)
tree300ae6e03d334d3193e0a2258266107ddbe74591 /src/lib/libcrypto/kdf/tls1_prf.c
parent5abae30b0971022196f18c7381dcf32a77144295 (diff)
downloadopenbsd-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.c5
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
104static int 103static int