From b8997d0b47f82155dcbbff54a99124a79495409c Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Tue, 5 Jan 2021 16:20:42 +0900 Subject: [PATCH] revert test_wolfssl.c changes add test.c as src target --- IDE/Espressif/ESP-IDF/test/CMakeLists.txt | 2 +- IDE/Espressif/ESP-IDF/test/test_wolfssl.c | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/IDE/Espressif/ESP-IDF/test/CMakeLists.txt b/IDE/Espressif/ESP-IDF/test/CMakeLists.txt index bba297799..ad31c5d98 100644 --- a/IDE/Espressif/ESP-IDF/test/CMakeLists.txt +++ b/IDE/Espressif/ESP-IDF/test/CMakeLists.txt @@ -1,6 +1,6 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_MAIN_DRIVER -DWOLFSSL_USER_SETTINGS") -set(COMPONENT_SRCS "test_wolfssl.c") +set(COMPONENT_SRCS "test_wolfssl.c" "../wolfcrypt/test/test.c") set(COMPONENT_ADD_INCLUDEDIRS ".") set(COMPONENT_REQUIRES unity test_utils wolfssl) diff --git a/IDE/Espressif/ESP-IDF/test/test_wolfssl.c b/IDE/Espressif/ESP-IDF/test/test_wolfssl.c index b08e7fc5c..b1cb8bd4c 100644 --- a/IDE/Espressif/ESP-IDF/test/test_wolfssl.c +++ b/IDE/Espressif/ESP-IDF/test/test_wolfssl.c @@ -34,12 +34,23 @@ static xSemaphoreHandle exit_semaph; static volatile bool exit_loop=false; static uint64_t startTime = 0; -#include "../wolfcrypt/test/test.c" - #define SHA_STACK_SIZE (20*1024) #define TIMES_SHA 500 #define TIMES_AES 100 +#ifndef NO_SHA +int sha_test(); +#endif +#ifndef NO_SHA256 +int sha256_test(); +#endif +#ifdef WOLFSSL_SHA384 +int sha384_test(void); +#endif +#ifdef WOLFSSL_SHA512 +int sha512_test(void); +#endif + static uint64_t rsa_elapsedTime = 0; static void esp32TimerStart() { @@ -53,6 +64,7 @@ static uint64_t esp32elapsedTime() } #ifndef NO_RSA +int rsa_test(void); static void tskRsa_Test(void *pvParam) { int ret = 0; @@ -77,6 +89,7 @@ static void tskRsa_Test(void *pvParam) #endif #ifndef NO_AES +int aes_test(void); static void tskAes_Test(void *pvParam) { int ret = 0; @@ -118,6 +131,7 @@ static void tskAesGcm_Test(void *pvParam) } #ifdef WOLFSSL_AES_192 +int aes192_test(void); static void tskAes192_Test(void *pvParam) { int ret = 0; @@ -137,6 +151,7 @@ static void tskAes192_Test(void *pvParam) } #endif #ifdef WOLFSSL_AES_256 +int aes256_test(void); static void tskAes256_Test(void *pvParam) { int ret = 0;