Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHA resource no longer correct for ESP32 #87

Open
TheMadTexan42 opened this issue Sep 26, 2022 · 4 comments
Open

SHA resource no longer correct for ESP32 #87

TheMadTexan42 opened this issue Sep 26, 2022 · 4 comments

Comments

@TheMadTexan42
Copy link

Can no longer build on ESP32 due to a change in the ESP32 SHA libraries.

hwcrypto/sha.h no longer exists.

The workaround seems to be to replace
#include <hwcrypto/sha.h>
in
\WebSockets.cpp (line42)
by
#include <esp32/sha.h>

(see espressif/esp-idf#3245)

However this is a recent change so ultimately it depends on the toolchain version you have in place for the ESP

@alex-eri
Copy link

#warning esp32/sha.h is deprecated, please use sha_parallel_engine.h instead

@JonLevin25
Copy link

Is there a way to #define <hwcrypto/sha.h> <esp32/sha.h> from user code, to avoid changing library?

The preprocessor doesn't seem to like it

In file included from src/main.cpp:5:
src/remote_debug.h:31:9: error: macro names must be identifiers
 #define <hwcrypto/sha.h> <esp32/sha.h>

@quazardous
Copy link

here is a good patch

Links2004/arduinoWebSockets#738 (comment)

  #if ESP_IDF_VERSION_MAJOR >= 4
    #if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(1, 0, 6) )
      #include "sha/sha_parallel_engine.h"
    #else
      #include <esp32/sha.h>
    #endif  
  #else
    #include <hwcrypto/sha.h>
  #endif

@quazardous
Copy link

crap just use https://github.com/karol-brejna-i/RemoteDebug (RemoteDebug2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants