mirror of
https://github.com/openssl/openssl.git
synced 2025-02-17 14:32:04 +08:00
EVP, PROV: Add misc missing bits for RSA-PSS
- EVP_PKEY_is_a() didn't recognise "RSA-PSS" for legacy keys. - The RSA-PSS keymgmt didn't have a OSSL_FUNC_keymgmt_match() function. - ossl_prov_prepare_rsa_params() didn't return 1 for unrestricted RSA-PSS params. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12492)
This commit is contained in:
parent
51d9ac870a
commit
456b3b97a4
@ -935,6 +935,8 @@ int EVP_PKEY_is_a(const EVP_PKEY *pkey, const char *name)
|
||||
|
||||
if (strcasecmp(name, "RSA") == 0)
|
||||
type = EVP_PKEY_RSA;
|
||||
else if (strcasecmp(name, "RSA-PSS") == 0)
|
||||
type = EVP_PKEY_RSA_PSS;
|
||||
#ifndef OPENSSL_NO_EC
|
||||
else if (strcasecmp(name, "EC") == 0)
|
||||
type = EVP_PKEY_EC;
|
||||
|
@ -632,6 +632,7 @@ const OSSL_DISPATCH rsapss_keymgmt_functions[] = {
|
||||
{ OSSL_FUNC_KEYMGMT_GET_PARAMS, (void (*) (void))rsa_get_params },
|
||||
{ OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS, (void (*) (void))rsa_gettable_params },
|
||||
{ OSSL_FUNC_KEYMGMT_HAS, (void (*)(void))rsa_has },
|
||||
{ OSSL_FUNC_KEYMGMT_MATCH, (void (*)(void))rsa_match },
|
||||
{ OSSL_FUNC_KEYMGMT_VALIDATE, (void (*)(void))rsa_validate },
|
||||
{ OSSL_FUNC_KEYMGMT_IMPORT, (void (*)(void))rsa_import },
|
||||
{ OSSL_FUNC_KEYMGMT_IMPORT_TYPES, (void (*)(void))rsa_import_types },
|
||||
|
@ -199,6 +199,7 @@ int ossl_prov_prepare_rsa_params(const void *rsa, int nid,
|
||||
case RSA_FLAG_TYPE_RSASSAPSS:
|
||||
if (rsa_pss_params_30_is_unrestricted(pss)) {
|
||||
*pstrtype = V_ASN1_UNDEF;
|
||||
return 1;
|
||||
} else {
|
||||
ASN1_STRING *astr = NULL;
|
||||
WPACKET pkt;
|
||||
|
Loading…
Reference in New Issue
Block a user