RSA: Be less strict on PSS parameters when exporting to provider
authorRichard Levitte <levitte@openssl.org>
Wed, 5 Aug 2020 06:01:59 +0000 (08:01 +0200)
committerPauli <paul.dale@oracle.com>
Thu, 6 Aug 2020 23:59:18 +0000 (09:59 +1000)
commit6ce6ad39fe85cf8b5c84ded9885329bf703ee649
treefe380d747814a957bfe959bb28cb8ee813af4be5
parent5f6a0b2ff055cf3ad09a1d49a4b95b13e1106b35
RSA: Be less strict on PSS parameters when exporting to provider

We have a key in test/recipes/30-test_evp_data/evppkey.txt with bad
PSS parameters (RSA-PSS-BAD), which is supposed to trigger signature
computation faults.  However, if this key needs to be exported to the
RSA provider implementation, the result would be an earlier error,
giving the computation that's supposed to be checked n chance to even
be reached.

Either way, the legacy to provider export is no place to validate the
values of the key.

We also ensure that the provider implementation can handle and detect
signed (negative) saltlen values.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12583)
crypto/rsa/rsa_ameth.c
include/crypto/rsa.h
providers/implementations/signature/rsa.c