Skip to content

Commit c71530b

Browse files
authored
BearSSL: Fix SHA1 mode setting for ESP32P4 on IDF 5.5+ (#24420)
Add conditional compilation for ESP32P4 in IDF 5.5
1 parent 13fad53 commit c71530b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/lib_ssl/bearssl-esp8266/src/hash/_sha_hal_idf5x.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ sha_hal_process_block(void *state_buf, const void *blk,
6969
size_t block_words, bool first)
7070
{
7171
SHA_ENTER();
72+
#if defined(CONFIG_IDF_TARGET_ESP32P4) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 5, 0)
73+
sha_ll_set_mode(type); // required on P4 in IDF 5.5+
74+
#endif
7275
if (!first) {
7376
sha_ll_write_digest(type, state_buf, digest_words);
7477
}

0 commit comments

Comments
 (0)