diff options
| author | tb <> | 2026-01-30 13:57:13 +0000 |
|---|---|---|
| committer | tb <> | 2026-01-30 13:57:13 +0000 |
| commit | 06d332fd67117492593691579e28332dffe3eb74 (patch) | |
| tree | d8a3761e5e45b2bda65e79c726062d44e61da6fa /src/lib | |
| parent | fdcc97e7af1a70232b9b2e46ae9336350095d9b1 (diff) | |
| download | openbsd-06d332fd67117492593691579e28332dffe3eb74.tar.gz openbsd-06d332fd67117492593691579e28332dffe3eb74.tar.bz2 openbsd-06d332fd67117492593691579e28332dffe3eb74.zip | |
EVP_SealInit(): clear random key on exit
ok jsing kenjiro
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/libcrypto/evp/p_legacy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/evp/p_legacy.c b/src/lib/libcrypto/evp/p_legacy.c index f882036e68..8896819546 100644 --- a/src/lib/libcrypto/evp/p_legacy.c +++ b/src/lib/libcrypto/evp/p_legacy.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: p_legacy.c,v 1.11 2026/01/30 13:54:28 tb Exp $ */ | 1 | /* $OpenBSD: p_legacy.c,v 1.12 2026/01/30 13:57:13 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -57,9 +57,9 @@ | |||
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #include <stdlib.h> | 59 | #include <stdlib.h> |
| 60 | #include <string.h> | ||
| 60 | 61 | ||
| 61 | #include <openssl/evp.h> | 62 | #include <openssl/evp.h> |
| 62 | |||
| 63 | #include <openssl/rsa.h> | 63 | #include <openssl/rsa.h> |
| 64 | 64 | ||
| 65 | #include "err_local.h" | 65 | #include "err_local.h" |
| @@ -200,6 +200,8 @@ EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek, | |||
| 200 | ret = npubk; | 200 | ret = npubk; |
| 201 | 201 | ||
| 202 | err: | 202 | err: |
| 203 | explicit_bzero(key, sizeof(key)); | ||
| 204 | |||
| 203 | return ret; | 205 | return ret; |
| 204 | } | 206 | } |
| 205 | LCRYPTO_ALIAS(EVP_SealInit); | 207 | LCRYPTO_ALIAS(EVP_SealInit); |
