Skip to content

Commit e3223d1

Browse files
Merge pull request #199 from jainvikas8/dev/jainvikas8/fix-return-code
Return right error code in psa_asymmetric_encrypt
2 parents fe93bc4 + 21599b6 commit e3223d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/psa_crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2755,7 +2755,7 @@ psa_status_t psa_asymmetric_encrypt( psa_key_handle_t handle,
27552755
mbedtls_rsa_context *rsa = slot->data.rsa;
27562756
int ret;
27572757
if( output_size < mbedtls_rsa_get_len( rsa ) )
2758-
return( PSA_ERROR_INVALID_ARGUMENT );
2758+
return( PSA_ERROR_BUFFER_TOO_SMALL );
27592759
#if defined(MBEDTLS_PKCS1_V15)
27602760
if( alg == PSA_ALG_RSA_PKCS1V15_CRYPT )
27612761
{

0 commit comments

Comments
 (0)