diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/kdf/tls1_prf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libcrypto/kdf/tls1_prf.c b/src/lib/libcrypto/kdf/tls1_prf.c index 7d6231e3c7..2b86ff744f 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.40 2024/07/10 06:53:27 tb Exp $ */ | 1 | /* $OpenBSD: tls1_prf.c,v 1.42 2025/05/21 03:53:20 kenjiro 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. |
@@ -61,10 +61,10 @@ | |||
61 | #include <stdio.h> | 61 | #include <stdio.h> |
62 | #include <string.h> | 62 | #include <string.h> |
63 | 63 | ||
64 | #include <openssl/err.h> | ||
65 | #include <openssl/evp.h> | 64 | #include <openssl/evp.h> |
66 | #include <openssl/kdf.h> | 65 | #include <openssl/kdf.h> |
67 | 66 | ||
67 | #include "err_local.h" | ||
68 | #include "evp_local.h" | 68 | #include "evp_local.h" |
69 | 69 | ||
70 | #define TLS1_PRF_MAXBUF 1024 | 70 | #define TLS1_PRF_MAXBUF 1024 |
@@ -96,6 +96,9 @@ pkey_tls1_prf_cleanup(EVP_PKEY_CTX *ctx) | |||
96 | { | 96 | { |
97 | struct tls1_prf_ctx *kctx = ctx->data; | 97 | struct tls1_prf_ctx *kctx = ctx->data; |
98 | 98 | ||
99 | if (kctx == NULL) | ||
100 | return; | ||
101 | |||
99 | freezero(kctx->secret, kctx->secret_len); | 102 | freezero(kctx->secret, kctx->secret_len); |
100 | freezero(kctx, sizeof(*kctx)); | 103 | freezero(kctx, sizeof(*kctx)); |
101 | } | 104 | } |