mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-31 19:21:18 +00:00
Fix use of mbedtls_psa_safer_memcmp in test code
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
787011542b
commit
33e1f42307
@ -25,6 +25,8 @@
|
|||||||
|
|
||||||
#include "test/drivers/aead.h"
|
#include "test/drivers/aead.h"
|
||||||
|
|
||||||
|
#include "mbedtls/constant_time.h"
|
||||||
|
|
||||||
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
|
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
|
||||||
#include "libtestdriver1/library/psa_crypto_aead.h"
|
#include "libtestdriver1/library/psa_crypto_aead.h"
|
||||||
#endif
|
#endif
|
||||||
@ -431,7 +433,7 @@ psa_status_t mbedtls_test_transparent_aead_verify(
|
|||||||
|
|
||||||
if (mbedtls_test_driver_aead_hooks.driver_status == PSA_SUCCESS) {
|
if (mbedtls_test_driver_aead_hooks.driver_status == PSA_SUCCESS) {
|
||||||
if (tag_length != check_tag_length ||
|
if (tag_length != check_tag_length ||
|
||||||
mbedtls_psa_safer_memcmp(tag, check_tag, tag_length)
|
mbedtls_ct_memcmp(tag, check_tag, tag_length)
|
||||||
!= 0) {
|
!= 0) {
|
||||||
mbedtls_test_driver_aead_hooks.driver_status =
|
mbedtls_test_driver_aead_hooks.driver_status =
|
||||||
PSA_ERROR_INVALID_SIGNATURE;
|
PSA_ERROR_INVALID_SIGNATURE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user