mbedtls tests: utility tests for APB corruption

Used when running mbedTLS self-tests to verify DPORT protection is working correctly.
This commit is contained in:
Angus Gratton
2017-08-15 16:45:40 +10:00
committed by Angus Gratton
parent d0c300c52d
commit 99c663a6e9
4 changed files with 83 additions and 0 deletions

View File

@@ -13,13 +13,16 @@
#include "freertos/semphr.h"
#include "unity.h"
#include "sdkconfig.h"
#include "test_apb_dport_access.h"
TEST_CASE("mbedtls SHA self-tests", "[mbedtls]")
{
start_apb_access_loop();
TEST_ASSERT_FALSE_MESSAGE(mbedtls_sha1_self_test(1), "SHA1 self-tests should pass.");
TEST_ASSERT_FALSE_MESSAGE(mbedtls_sha256_self_test(1), "SHA256 self-tests should pass.");
TEST_ASSERT_FALSE_MESSAGE(mbedtls_sha512_self_test(1), "SHA512 self-tests should pass.");
TEST_ASSERT_FALSE_MESSAGE(mbedtls_sha512_self_test(1), "SHA512 self-tests should pass.");
verify_apb_access_loop();
}
static const unsigned char *one_hundred_as = (unsigned char *)