From: Shane Lontis Date: Fri, 12 Feb 2021 04:17:23 +0000 (+1000) Subject: Remove dead code in rsa_pkey_ctrl. X-Git-Tag: openssl-3.0.0-alpha12~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a43091bc7c021ae90101473ade8ee4f52976482;p=thirdparty%2Fopenssl.git Remove dead code in rsa_pkey_ctrl. Fixes CID #1472393 Previously this switch handled CMS & PCKS7 controls (e.g ANS1_PKEY_CTRL_PKCS7_SIGN) which fell thru to the dead code to set the X509_ALG. Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/14163) --- diff --git a/crypto/rsa/rsa_ameth.c b/crypto/rsa/rsa_ameth.c index e2dec1c98d0..479155b90b2 100644 --- a/crypto/rsa/rsa_ameth.c +++ b/crypto/rsa/rsa_ameth.c @@ -486,7 +486,6 @@ static int rsa_sig_print(BIO *bp, const X509_ALGOR *sigalg, static int rsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) { - X509_ALGOR *alg = NULL; const EVP_MD *md; const EVP_MD *mgf1md; int min_saltlen; @@ -508,14 +507,7 @@ static int rsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2) default: return -2; - } - - if (alg) - X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaEncryption), V_ASN1_NULL, 0); - - return 1; - } /*