mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
Indicate if we know that a nonce length is invalid
This restores the behaviour found in the previously released versions and development_2.x. Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
@@ -3658,13 +3658,13 @@ static psa_status_t psa_aead_check_nonce_length( psa_algorithm_t alg,
|
||||
case PSA_ALG_CHACHA20_POLY1305:
|
||||
if( nonce_length == 12 )
|
||||
return( PSA_SUCCESS );
|
||||
break;
|
||||
return( PSA_ERROR_NOT_SUPPORTED );
|
||||
#endif /* PSA_WANT_ALG_CHACHA20_POLY1305 */
|
||||
default:
|
||||
break;
|
||||
return( PSA_ERROR_NOT_SUPPORTED );
|
||||
}
|
||||
|
||||
return( PSA_ERROR_NOT_SUPPORTED );
|
||||
return( PSA_ERROR_INVALID_ARGUMENT );
|
||||
}
|
||||
|
||||
psa_status_t psa_aead_encrypt( mbedtls_svc_key_id_t key,
|
||||
|
Reference in New Issue
Block a user