wolfSSL / wolfssl

The wolfSSL library is a small, fast, portable implementation of TLS/SSL for embedded devices to the cloud. wolfSSL supports up to TLS 1.3 and DTLS 1.3!
https://www.wolfssl.com
GNU General Public License v2.0
2.29k stars 818 forks source link

Found a typo in esp32_sha.c #7606

Closed Jreuningschererhubbell closed 3 months ago

Jreuningschererhubbell commented 3 months ago

The file wolfcrypt/src/port/Espressif/esp32_sha.c has a typo in line 1523.

https://github.com/wolfSSL/wolfssl/blob/40562a0cb350a80b33053b407e5581a473af1866/wolfcrypt/src/port/Espressif/esp32_sha.c#L1523

The correct function name is ESP_LOGI.

Compiling for ESP32 with the typo results in an 'implicit function declaration error':

REDACTED-PATH/wolfssl/wolfcrypt/src/port/Espressif/esp32_sha.c: In function 'esp_sha_hw_unlock':
REDACTED-PATH/wolfssl/wolfcrypt/src/port/Espressif/esp32_sha.c:1523:5: error: implicit declaration of function 'SP_LOGI'; did you mean 'ESP_LOGI'? [-Werror=implicit-function-declaration]
 1523 |     SP_LOGI(TAG, "3) esp_sha_hw_unlock Lock depth @ %d = %d "
      |     ^~~~~~~
      |     ESP_LOGI
cc1: some warnings being treated as errors

Compiling for ESP32 with the corrected function name succeeds.

I discovered this issue when I enabled WOLFSSL_ESP32_HW_LOCK_DEBUG while working with a ESP32-WROOM-32E.

Thanks!

Edit: I misspelled 'REDACTED'

gojimmypi commented 3 months ago

Hi @Jreuningschererhubbell and thank you for reporting this! I've created https://github.com/wolfSSL/wolfssl/pull/7607 to fix it.

We're always interested in what folks are doing with wolfSSL. Please let me know more about your project here or if you prefer privacy you can reach me at jim@wolfssl.com, or for general support: support@wolfssl.com.

I have a particular interest in the Espressif code; I'd like to make sure it is robust and flexible. Any additional feedback is welcome.