1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Merge pull request #5076 from mstarzyk-mobica/psa_ccm_no_tag

PSA CCM*-no-tag
This commit is contained in:
Manuel Pégourié-Gonnard
2021-11-10 10:18:55 +01:00
committed by GitHub
19 changed files with 1366 additions and 11 deletions

View File

@ -3595,7 +3595,12 @@ psa_status_t psa_cipher_decrypt( mbedtls_svc_key_id_t key,
.core = slot->attr
};
if( input_length < PSA_CIPHER_IV_LENGTH( slot->attr.type, alg ) )
if( alg == PSA_ALG_CCM_STAR_NO_TAG && input_length < PSA_BLOCK_CIPHER_BLOCK_LENGTH( slot->attr.type ) )
{
status = PSA_ERROR_INVALID_ARGUMENT;
goto exit;
}
else if ( input_length < PSA_CIPHER_IV_LENGTH( slot->attr.type, alg ) )
{
status = PSA_ERROR_INVALID_ARGUMENT;
goto exit;