mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-25 07:25:39 +00:00
Allow psa_asymmetric_verify and psa_asymmetric_encrypt to use public key only.
This commit is contained in:
parent
d708260de4
commit
1c2a7ea4e2
|
@ -1349,7 +1349,8 @@ psa_status_t psa_asymmetric_verify(psa_key_slot_t key,
|
||||||
return(PSA_ERROR_NOT_PERMITTED);
|
return(PSA_ERROR_NOT_PERMITTED);
|
||||||
|
|
||||||
#if defined(MBEDTLS_RSA_C)
|
#if defined(MBEDTLS_RSA_C)
|
||||||
if( slot->type == PSA_KEY_TYPE_RSA_KEYPAIR )
|
if( ( slot->type == PSA_KEY_TYPE_RSA_KEYPAIR ) ||
|
||||||
|
( slot->type == PSA_KEY_TYPE_RSA_PUBLIC_KEY ) )
|
||||||
{
|
{
|
||||||
mbedtls_rsa_context *rsa = slot->data.rsa;
|
mbedtls_rsa_context *rsa = slot->data.rsa;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -1438,7 +1439,8 @@ psa_status_t psa_asymmetric_encrypt(psa_key_slot_t key,
|
||||||
|
|
||||||
|
|
||||||
#if defined(MBEDTLS_RSA_C)
|
#if defined(MBEDTLS_RSA_C)
|
||||||
if( slot->type == PSA_KEY_TYPE_RSA_KEYPAIR )
|
if( ( slot->type == PSA_KEY_TYPE_RSA_KEYPAIR ) ||
|
||||||
|
( slot->type == PSA_KEY_TYPE_RSA_PUBLIC_KEY) )
|
||||||
{
|
{
|
||||||
mbedtls_rsa_context *rsa = slot->data.rsa;
|
mbedtls_rsa_context *rsa = slot->data.rsa;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
Loading…
Reference in a new issue