diff options
author | Tobias Nießen <tniessen@tnie.de> | 2019-10-18 20:44:49 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2019-10-28 11:07:10 +0000 |
commit | 465a58b117d5a85623f3998d6fbf2fe8712a5604 (patch) | |
tree | 84be351f06ad65b5d618d9c6223d29b79889e50e /crypto | |
parent | aed8c47cbcc8a289bea433ead2effea035187260 (diff) |
Allow EVP_PKEY_get0_RSA for RSA-PSS keys
RSA-PSS keys use the same internal structure as RSA keys but do not
allow accessing it through EVP_PKEY_get0_RSA. This commit changes that
behavior.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10217)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/evp/p_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c index 04530063d8..0e93786c82 100644 --- a/crypto/evp/p_lib.c +++ b/crypto/evp/p_lib.c @@ -493,7 +493,7 @@ int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key) RSA *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey) { - if (pkey->type != EVP_PKEY_RSA) { + if (pkey->type != EVP_PKEY_RSA && pkey->type != EVP_PKEY_RSA_PSS) { EVPerr(EVP_F_EVP_PKEY_GET0_RSA, EVP_R_EXPECTING_AN_RSA_KEY); return NULL; } |