From f4935f52b5541926fea9e26158107bfcf10cf0d6 Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Thu, 29 Apr 2021 09:20:16 +0900 Subject: [PATCH] clear PROT_RSA_PD bit in PORT_RSA_PD_CTRL_REG to be initialization and activate RSA accelerator --- .../ESP-IDF/examples/wolfssl_client/main/wifi_connect.c | 8 ++++---- .../ESP-IDF/examples/wolfssl_server/main/wifi_connect.c | 8 ++++---- wolfcrypt/src/port/Espressif/esp32_mp.c | 1 + 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/wifi_connect.c b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/wifi_connect.c index 58f9751d4..a79ab29e2 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/wifi_connect.c +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_client/main/wifi_connect.c @@ -51,10 +51,10 @@ static void set_time() time_t now; struct tm timeinfo; char strftime_buf[64]; - /* please update the time if seeing unknown failure. */ - /* this could cause TLS communication failure due to time expiration */ - /* incleasing 31536000 seconds is close to spend 356 days. */ - utctime.tv_sec = 1598661910; /* dummy time: Fri Aug 29 09:45:00 2020 */ + /* please update the time if seeing unknown failure when loading cert. */ + /* this could cause TLS communication failure due to time expiration */ + /* incleasing 31536000 seconds is close to spend 356 days. */ + utctime.tv_sec = 1619650800; /* dummy time: Wed April 28 23:00:00 2021 */ utctime.tv_usec = 0; tz.tz_minuteswest = 0; tz.tz_dsttime = 0; diff --git a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/wifi_connect.c b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/wifi_connect.c index 471ab3de5..5048e9f6e 100644 --- a/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/wifi_connect.c +++ b/IDE/Espressif/ESP-IDF/examples/wolfssl_server/main/wifi_connect.c @@ -48,10 +48,10 @@ static void set_time() time_t now; struct tm timeinfo; char strftime_buf[64]; - /* please update the time if seeing unknown failure. */ - /* this could cause TLS communication failure due to time expiration */ - /* incleasing 31536000 seconds is close to spend 356 days. */ - utctime.tv_sec = 1598661910; /* dummy time: Fri Aug 29 09:45:00 2020 */ + /* please update the time if seeing unknown failure when loading cert. */ + /* this could cause TLS communication failure due to time expiration */ + /* incleasing 31536000 seconds is close to spend 356 days. */ + utctime.tv_sec = 1619650800; /* dummy time: Wed April 28 23:00:00 2021 */ utctime.tv_usec = 0; tz.tz_minuteswest = 0; tz.tz_dsttime = 0; diff --git a/wolfcrypt/src/port/Espressif/esp32_mp.c b/wolfcrypt/src/port/Espressif/esp32_mp.c index b6ad0e79c..2fb719d6e 100644 --- a/wolfcrypt/src/port/Espressif/esp32_mp.c +++ b/wolfcrypt/src/port/Espressif/esp32_mp.c @@ -94,6 +94,7 @@ static int esp_mp_hw_lock() /* Enable RSA hardware */ periph_module_enable(PERIPH_RSA_MODULE); + DPORT_REG_CLR_BIT(DPORT_RSA_PD_CTRL_REG, DPORT_RSA_PD); return ret; } /*