commit | 5c8845f5635d0fca6a25cca89880be0efde884cb | [log] [tgz] |
---|---|---|
author | mohammad1603 <mohammad.abomokh@arm.com> | Wed May 09 05:40:09 2018 -0700 |
committer | itayzafrir <itay.zafrir@arm.com> | Wed Sep 05 12:38:18 2018 +0300 |
tree | 1ec7fc0867f4ab8e785c425266572dca45ab549e | |
parent | d973472a37647e52913729a8d0d10c5da2d3ffca [diff] |
return invalid argument for unsupported algorithms
diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 5810853..aaaa8a5 100755 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c
@@ -1564,6 +1564,10 @@ mbedtls_ccm_free( &ccm ); } + else + { + return( PSA_ERROR_INVALID_ARGUMENT ); + } memcpy( ciphertext + plaintext_length, tag, sizeof( tag ) ); *ciphertext_length = plaintext_length + sizeof( tag ); return( PSA_SUCCESS );