diff options
| author | tb <> | 2026-01-30 13:54:28 +0000 |
|---|---|---|
| committer | tb <> | 2026-01-30 13:54:28 +0000 |
| commit | fdcc97e7af1a70232b9b2e46ae9336350095d9b1 (patch) | |
| tree | a9269e1d0bf0d3c4f708fa92debdbaed147e64c0 /src/lib/libcrypto | |
| parent | 9e1ab34f681a4aaf84ec91a6d2b36c59c85b73d7 (diff) | |
| download | openbsd-fdcc97e7af1a70232b9b2e46ae9336350095d9b1.tar.gz openbsd-fdcc97e7af1a70232b9b2e46ae9336350095d9b1.tar.bz2 openbsd-fdcc97e7af1a70232b9b2e46ae9336350095d9b1.zip | |
EVP_{Open,Seal}Init(): remove redundant EVP_CIPHER_CTX_reset() calls
The subsequent EVP_{Decrypt,Encrypt}Init_ex() calls already do that.
pointed out by jsing
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/evp/p_legacy.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/libcrypto/evp/p_legacy.c b/src/lib/libcrypto/evp/p_legacy.c index 02153be20b..f882036e68 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.10 2026/01/30 13:51:44 tb Exp $ */ | 1 | /* $OpenBSD: p_legacy.c,v 1.11 2026/01/30 13:54:28 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 | * |
| @@ -102,8 +102,6 @@ EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, | |||
| 102 | int ret = 0; | 102 | int ret = 0; |
| 103 | 103 | ||
| 104 | if (type != NULL) { | 104 | if (type != NULL) { |
| 105 | if (!EVP_CIPHER_CTX_reset(ctx)) | ||
| 106 | goto err; | ||
| 107 | if (!EVP_DecryptInit_ex(ctx, type, NULL, NULL, NULL)) | 105 | if (!EVP_DecryptInit_ex(ctx, type, NULL, NULL, NULL)) |
| 108 | goto err; | 106 | goto err; |
| 109 | } | 107 | } |
| @@ -167,8 +165,6 @@ EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek, | |||
| 167 | int ret = 0; | 165 | int ret = 0; |
| 168 | 166 | ||
| 169 | if (type != NULL) { | 167 | if (type != NULL) { |
| 170 | if (!EVP_CIPHER_CTX_reset(ctx)) | ||
| 171 | goto err; | ||
| 172 | if (!EVP_EncryptInit_ex(ctx, type, NULL, NULL, NULL)) | 168 | if (!EVP_EncryptInit_ex(ctx, type, NULL, NULL, NULL)) |
| 173 | goto err; | 169 | goto err; |
| 174 | } | 170 | } |
