openssl/crypto/rsa
Benjamin Kaduk 9c44916ce5 RSA: Do not set NULL OAEP labels
As of the previous commit, when a zero-length (string) parameter
is present in the parameters passed to a provider for a given operation,
we will produce an object corresponding to that zero-length parameter,
indicating to the underlying cryptographic operation that the parameter
was passed.  However, rsa_cms_decrypt() was relying on the previous
behavior, and unconditionally tried to call
EVP_PKEY_CTX_set0_rsa_oaep_label() even when the implicit default label
was used (and thus the relevant local variable was still NULL).
In the new setup that distinguishes present-but-empty and absent
more clearly, it is an error to attempt to set a NULL parameter,
even if it is zero-length.

Exercise more caution when setting parameters, and do not call
EVP_PKEY_CTX_set0_rsa_oaep_label() when there is not actually a
label provided.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11920)
2020-05-28 10:01:47 -07:00
..
build.info RSA: Add rsa_schemes.c, to store scheme data and translator functions 2020-05-14 12:16:34 +02:00
rsa_ameth.c RSA: Do not set NULL OAEP labels 2020-05-28 10:01:47 -07:00
rsa_asn1.c Update copyright year 2020-04-23 13:55:52 +01:00
rsa_backend.c RSA: Add a less loaded PSS-parameter structure 2020-05-14 12:16:35 +02:00
rsa_chk.c Rename FIPS_MODE to FIPS_MODULE 2020-04-28 15:37:37 +02:00
rsa_crpt.c Update copyright year 2020-04-23 13:55:52 +01:00
rsa_depr.c Update copyright year 2020-04-23 13:55:52 +01:00
rsa_err.c Make the RSA ASYM_CIPHER implementation available inside the FIPS module 2020-02-13 14:14:30 +00:00
rsa_gen.c coverity 1462561 Uninitialized scalar variable 2020-04-30 20:21:32 +10:00
rsa_lib.c EVP: Refactor the RSA-PSS key generation controls for providers 2020-05-14 12:17:09 +02:00
rsa_local.h PROV: Use rsa_padding_add_PKCS1_OAEP_mgf1_with_libctx() in RSA-OAEP 2020-05-27 12:42:20 +02:00
rsa_meth.c Update copyright year 2020-04-23 13:55:52 +01:00
rsa_mp_names.c Rename FIPS_MODE to FIPS_MODULE 2020-04-28 15:37:37 +02:00
rsa_mp.c Reorganize local header files 2019-09-28 20:26:35 +02:00
rsa_none.c Update copyright year 2020-04-23 13:55:52 +01:00
rsa_oaep.c rsa_padding_add_PKCS1_OAEP_mgf1_with_libctx(): fix check of |md| 2020-05-20 21:10:10 +02:00
rsa_ossl.c Rename FIPS_MODE to FIPS_MODULE 2020-04-28 15:37:37 +02:00
rsa_pk1.c Rename FIPS_MODE to FIPS_MODULE 2020-04-28 15:37:37 +02:00
rsa_pmeth.c Add RSA SHA512 truncated digest support 2020-05-07 16:00:40 +10:00
rsa_prn.c Update copyright year 2020-04-23 13:55:52 +01:00
rsa_pss.c RSA: Add a less loaded PSS-parameter structure 2020-05-14 12:16:35 +02:00
rsa_saos.c Update copyright year 2020-04-23 13:55:52 +01:00
rsa_schemes.c RSA: Add rsa_schemes.c, to store scheme data and translator functions 2020-05-14 12:16:34 +02:00
rsa_sign.c Rename FIPS_MODE to FIPS_MODULE 2020-04-28 15:37:37 +02:00
rsa_sp800_56b_check.c Amend references to "OpenSSL license" 2020-04-29 15:27:22 +02:00
rsa_sp800_56b_gen.c Amend references to "OpenSSL license" 2020-04-29 15:27:22 +02:00
rsa_ssl.c Update copyright year 2020-04-23 13:55:52 +01:00
rsa_x931.c Update copyright year 2020-04-23 13:55:52 +01:00
rsa_x931g.c Update copyright year 2020-04-23 13:55:52 +01:00