From 554faad2603d9b8c96dfd5ab4ae8348ca4a1ff3a Mon Sep 17 00:00:00 2001 From: mohammad1603 Date: Sun, 3 Jun 2018 15:07:38 +0300 Subject: [PATCH] return NOT_SUPPORTED instead of INVLID_ARGUMENT --- library/psa_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index eadd42890..699b8f301 100755 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -1572,7 +1572,7 @@ psa_status_t psa_aead_encrypt( psa_key_slot_t key, } else { - return( PSA_ERROR_INVALID_ARGUMENT ); + return( PSA_ERROR_NOT_SUPPORTED ); } memcpy( ciphertext + plaintext_length, tag, sizeof( tag ) ); *ciphertext_length = plaintext_length + sizeof( tag ); @@ -1706,7 +1706,7 @@ psa_status_t psa_aead_decrypt( psa_key_slot_t key, } else { - return( PSA_ERROR_INVALID_ARGUMENT ); + return( PSA_ERROR_NOT_SUPPORTED ); } if( ret != 0 )