summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa
diff options
context:
space:
mode:
authortb <>2024-02-18 15:45:42 +0000
committertb <>2024-02-18 15:45:42 +0000
commit46825b346de88f3d8b554aef8711f11431f7e17c (patch)
tree9047d6e85fd9fcd495ed303a0ed1b208200ff841 /src/lib/libcrypto/rsa
parent39b6299876ec6c908309c9f47f3940eb84b3be12 (diff)
downloadopenbsd-46825b346de88f3d8b554aef8711f11431f7e17c.tar.gz
openbsd-46825b346de88f3d8b554aef8711f11431f7e17c.tar.bz2
openbsd-46825b346de88f3d8b554aef8711f11431f7e17c.zip
Use EVP_MD_CTX_legacy_clear() internally
ok jsing
Diffstat (limited to 'src/lib/libcrypto/rsa')
-rw-r--r--src/lib/libcrypto/rsa/rsa_oaep.c4
-rw-r--r--src/lib/libcrypto/rsa/rsa_pss.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_oaep.c b/src/lib/libcrypto/rsa/rsa_oaep.c
index c2c3a61daa..4927673898 100644
--- a/src/lib/libcrypto/rsa/rsa_oaep.c
+++ b/src/lib/libcrypto/rsa/rsa_oaep.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_oaep.c,v 1.37 2023/07/08 12:26:45 beck Exp $ */ 1/* $OpenBSD: rsa_oaep.c,v 1.38 2024/02/18 15:45:42 tb Exp $ */
2/* 2/*
3 * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. 3 * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved.
4 * 4 *
@@ -331,7 +331,7 @@ PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,
331 int mdlen; 331 int mdlen;
332 int rv = -1; 332 int rv = -1;
333 333
334 EVP_MD_CTX_init(&c); 334 EVP_MD_CTX_legacy_clear(&c);
335 mdlen = EVP_MD_size(dgst); 335 mdlen = EVP_MD_size(dgst);
336 if (mdlen < 0) 336 if (mdlen < 0)
337 goto err; 337 goto err;
diff --git a/src/lib/libcrypto/rsa/rsa_pss.c b/src/lib/libcrypto/rsa/rsa_pss.c
index 0860409be9..6670866ff6 100644
--- a/src/lib/libcrypto/rsa/rsa_pss.c
+++ b/src/lib/libcrypto/rsa/rsa_pss.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_pss.c,v 1.17 2023/07/08 12:26:45 beck Exp $ */ 1/* $OpenBSD: rsa_pss.c,v 1.18 2024/02/18 15:45:42 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2005. 3 * project 2005.
4 */ 4 */
@@ -92,7 +92,7 @@ RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
92 EVP_MD_CTX ctx; 92 EVP_MD_CTX ctx;
93 unsigned char H_[EVP_MAX_MD_SIZE]; 93 unsigned char H_[EVP_MAX_MD_SIZE];
94 94
95 EVP_MD_CTX_init(&ctx); 95 EVP_MD_CTX_legacy_clear(&ctx);
96 96
97 if (mgf1Hash == NULL) 97 if (mgf1Hash == NULL)
98 mgf1Hash = Hash; 98 mgf1Hash = Hash;
@@ -200,7 +200,7 @@ RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
200 unsigned char *H, *salt = NULL, *p; 200 unsigned char *H, *salt = NULL, *p;
201 EVP_MD_CTX ctx; 201 EVP_MD_CTX ctx;
202 202
203 EVP_MD_CTX_init(&ctx); 203 EVP_MD_CTX_legacy_clear(&ctx);
204 204
205 if (mgf1Hash == NULL) 205 if (mgf1Hash == NULL)
206 mgf1Hash = Hash; 206 mgf1Hash = Hash;