mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-22 05:46:41 +01:00
Make a check more explicit in aes.c
The check was already done later when calling ECB, (as evidenced by the tests passing, which have a call with data_unit set to NULL), but it's more readable to have it here too, and more helpful when debugging.
This commit is contained in:
parent
eb6d3968b1
commit
998a358529
1 changed files with 1 additions and 0 deletions
|
|
@ -1183,6 +1183,7 @@ int mbedtls_aes_crypt_xts( mbedtls_aes_xts_context *ctx,
|
||||||
AES_VALIDATE_RET( ctx != NULL );
|
AES_VALIDATE_RET( ctx != NULL );
|
||||||
AES_VALIDATE_RET( mode == MBEDTLS_AES_ENCRYPT ||
|
AES_VALIDATE_RET( mode == MBEDTLS_AES_ENCRYPT ||
|
||||||
mode == MBEDTLS_AES_DECRYPT );
|
mode == MBEDTLS_AES_DECRYPT );
|
||||||
|
AES_VALIDATE_RET( data_unit != NULL );
|
||||||
AES_VALIDATE_RET( input != NULL );
|
AES_VALIDATE_RET( input != NULL );
|
||||||
AES_VALIDATE_RET( output != NULL );
|
AES_VALIDATE_RET( output != NULL );
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue