mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-11-09 23:00:03 +08:00
psa-rsa: call pkcs1_v15 function directly
Like the OAEP path calls the OAEP function directly Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
4c70413087
commit
859cf0788d
@ -652,14 +652,10 @@ psa_status_t mbedtls_psa_asymmetric_decrypt(const psa_key_attributes_t *attribut
|
|||||||
|
|
||||||
if (alg == PSA_ALG_RSA_PKCS1V15_CRYPT) {
|
if (alg == PSA_ALG_RSA_PKCS1V15_CRYPT) {
|
||||||
#if defined(MBEDTLS_PSA_BUILTIN_ALG_RSA_PKCS1V15_CRYPT)
|
#if defined(MBEDTLS_PSA_BUILTIN_ALG_RSA_PKCS1V15_CRYPT)
|
||||||
status = mbedtls_to_psa_error(
|
int ret = mbedtls_rsa_rsaes_pkcs1_v15_decrypt(
|
||||||
mbedtls_rsa_pkcs1_decrypt(rsa,
|
rsa, mbedtls_psa_get_random, MBEDTLS_PSA_RANDOM_STATE,
|
||||||
mbedtls_psa_get_random,
|
output_length, input, output, output_size);
|
||||||
MBEDTLS_PSA_RANDOM_STATE,
|
status = mbedtls_to_psa_error(ret);
|
||||||
output_length,
|
|
||||||
input,
|
|
||||||
output,
|
|
||||||
output_size));
|
|
||||||
#else
|
#else
|
||||||
status = PSA_ERROR_NOT_SUPPORTED;
|
status = PSA_ERROR_NOT_SUPPORTED;
|
||||||
#endif /* MBEDTLS_PSA_BUILTIN_ALG_RSA_PKCS1V15_CRYPT */
|
#endif /* MBEDTLS_PSA_BUILTIN_ALG_RSA_PKCS1V15_CRYPT */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user