]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Remove check for RSA encryption allowing X9.31 padding.
authorslontis <shane.lontis@oracle.com>
Fri, 19 Jul 2024 02:11:05 +0000 (12:11 +1000)
committerTodd Short <todd.short@me.com>
Sun, 21 Jul 2024 15:54:58 +0000 (11:54 -0400)
X9.31 is a Signature Standard, and should not apply to encryption.

rsa_ossl_public_encrypt() does not allow this padding mode.
The openssl rsautil command line tool already failed if the
-x931 option was used with -encrypt

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/24938)

providers/implementations/asymciphers/rsa_enc.c

index f88cc96a75f15d7e0aa4d42a1996e115fe90dbca..8181b4fbc44b795ed7434a2068840052b8259bc7 100644 (file)
@@ -51,7 +51,6 @@ static OSSL_ITEM padding_item[] = {
     { RSA_NO_PADDING,           OSSL_PKEY_RSA_PAD_MODE_NONE },
     { RSA_PKCS1_OAEP_PADDING,   OSSL_PKEY_RSA_PAD_MODE_OAEP }, /* Correct spelling first */
     { RSA_PKCS1_OAEP_PADDING,   "oeap"   },
-    { RSA_X931_PADDING,         OSSL_PKEY_RSA_PAD_MODE_X931 },
     { 0,                        NULL     }
 };