mirror of
https://github.com/openssl/openssl.git
synced 2025-02-23 14:42:15 +08:00
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)
This commit is contained in:
parent
aed8c47cbc
commit
465a58b117
@ -493,7 +493,7 @@ int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key)
|
|||||||
|
|
||||||
RSA *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey)
|
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);
|
EVPerr(EVP_F_EVP_PKEY_GET0_RSA, EVP_R_EXPECTING_AN_RSA_KEY);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user