summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/p_legacy.c
diff options
context:
space:
mode:
authortb <>2024-02-18 15:44:10 +0000
committertb <>2024-02-18 15:44:10 +0000
commit39b6299876ec6c908309c9f47f3940eb84b3be12 (patch)
treeb0632599c491a36f1093cf7c7c9f79bfda606b0a /src/lib/libcrypto/evp/p_legacy.c
parent6098295db7aa89d96198a327d46d76586bd54ee0 (diff)
downloadopenbsd-39b6299876ec6c908309c9f47f3940eb84b3be12.tar.gz
openbsd-39b6299876ec6c908309c9f47f3940eb84b3be12.tar.bz2
openbsd-39b6299876ec6c908309c9f47f3940eb84b3be12.zip
Use EVP_CIPHER_CTX_legacy_clear() internally
ok jsing
Diffstat (limited to 'src/lib/libcrypto/evp/p_legacy.c')
-rw-r--r--src/lib/libcrypto/evp/p_legacy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/evp/p_legacy.c b/src/lib/libcrypto/evp/p_legacy.c
index f73a6a9dae..2036258dc5 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.2 2023/12/20 13:52:17 tb Exp $ */ 1/* $OpenBSD: p_legacy.c,v 1.3 2024/02/18 15:44:10 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 *
@@ -99,7 +99,7 @@ EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
99 int i, size = 0, ret = 0; 99 int i, size = 0, ret = 0;
100 100
101 if (type) { 101 if (type) {
102 EVP_CIPHER_CTX_init(ctx); 102 EVP_CIPHER_CTX_legacy_clear(ctx);
103 if (!EVP_DecryptInit_ex(ctx, type, NULL, NULL, NULL)) 103 if (!EVP_DecryptInit_ex(ctx, type, NULL, NULL, NULL))
104 return 0; 104 return 0;
105 } 105 }
@@ -154,7 +154,7 @@ EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek,
154 int i, iv_len; 154 int i, iv_len;
155 155
156 if (type) { 156 if (type) {
157 EVP_CIPHER_CTX_init(ctx); 157 EVP_CIPHER_CTX_legacy_clear(ctx);
158 if (!EVP_EncryptInit_ex(ctx, type, NULL, NULL, NULL)) 158 if (!EVP_EncryptInit_ex(ctx, type, NULL, NULL, NULL))
159 return 0; 159 return 0;
160 } 160 }