summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/kdf/tls1_prf.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libcrypto/kdf/tls1_prf.c b/src/lib/libcrypto/kdf/tls1_prf.c
index cefb3e2cad..594537ca3f 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.30 2024/07/09 17:01:40 tb Exp $ */ 1/* $OpenBSD: tls1_prf.c,v 1.31 2024/07/09 17:04:50 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.
@@ -119,15 +119,14 @@ pkey_tls1_prf_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
119 case EVP_PKEY_CTRL_TLS_SECRET: 119 case EVP_PKEY_CTRL_TLS_SECRET:
120 if (p1 < 0) 120 if (p1 < 0)
121 return 0; 121 return 0;
122 if (kctx->secret != NULL)
123 freezero(kctx->secret, kctx->secret_len);
124
125 explicit_bzero(kctx->seed, kctx->seed_len);
126 kctx->seed_len = 0;
127 122
123 freezero(kctx->secret, kctx->secret_len);
128 kctx->secret = NULL; 124 kctx->secret = NULL;
129 kctx->secret_len = 0; 125 kctx->secret_len = 0;
130 126
127 explicit_bzero(kctx->seed, kctx->seed_len);
128 kctx->seed_len = 0;
129
131 if (p1 == 0 || p2 == NULL) 130 if (p1 == 0 || p2 == NULL)
132 return 0; 131 return 0;
133 132