mirror of https://github.com/ARMmbed/mbed-os.git
mbedtls: Run mbedtls_timing_self_test if MBEDTLS_TIMING_C
This allows us to verify the support for Mbed TLS timing on Mbed OS. Note: The macros MBEDTLS_TIMING_C and MBEDTLS_TIMING_ALT are not enabled by default and need to be additionally enabled to run this test.pull/14772/head
parent
ca719a96a8
commit
d6f825ebf0
|
@ -35,6 +35,7 @@ using namespace utest::v1;
|
||||||
#include "mbedtls/sha512.h"
|
#include "mbedtls/sha512.h"
|
||||||
#include "mbedtls/entropy.h"
|
#include "mbedtls/entropy.h"
|
||||||
#include "mbedtls/entropy_poll.h"
|
#include "mbedtls/entropy_poll.h"
|
||||||
|
#include "mbedtls/timing.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
@ -65,6 +66,10 @@ MBEDTLS_SELF_TEST_TEST_CASE(mbedtls_sha512_self_test)
|
||||||
MBEDTLS_SELF_TEST_TEST_CASE(mbedtls_entropy_self_test)
|
MBEDTLS_SELF_TEST_TEST_CASE(mbedtls_entropy_self_test)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_TIMING_C)
|
||||||
|
MBEDTLS_SELF_TEST_TEST_CASE(mbedtls_timing_self_test)
|
||||||
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#warning "MBEDTLS_SELF_TEST not enabled"
|
#warning "MBEDTLS_SELF_TEST not enabled"
|
||||||
#endif /* MBEDTLS_SELF_TEST */
|
#endif /* MBEDTLS_SELF_TEST */
|
||||||
|
@ -84,6 +89,10 @@ Case cases[] = {
|
||||||
Case("mbedtls_entropy_self_test", mbedtls_entropy_self_test_test_case),
|
Case("mbedtls_entropy_self_test", mbedtls_entropy_self_test_test_case),
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_TIMING_C)
|
||||||
|
Case("mbedtls_timing_self_test", mbedtls_timing_self_test_test_case),
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* MBEDTLS_SELF_TEST */
|
#endif /* MBEDTLS_SELF_TEST */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue