mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-05-31 09:07:11 +00:00
return invalid argument for unsupported algorithms
This commit is contained in:
parent
d973472a37
commit
5c8845f563
|
@ -1564,6 +1564,10 @@ psa_status_t psa_aead_encrypt( psa_key_slot_t key,
|
||||||
|
|
||||||
mbedtls_ccm_free( &ccm );
|
mbedtls_ccm_free( &ccm );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||||
|
}
|
||||||
memcpy( ciphertext + plaintext_length, tag, sizeof( tag ) );
|
memcpy( ciphertext + plaintext_length, tag, sizeof( tag ) );
|
||||||
*ciphertext_length = plaintext_length + sizeof( tag );
|
*ciphertext_length = plaintext_length + sizeof( tag );
|
||||||
return( PSA_SUCCESS );
|
return( PSA_SUCCESS );
|
||||||
|
|
Loading…
Reference in a new issue