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

warning sha.h is deprecated, use sha_parallel_engine.h #738

Closed
societyofrobots opened this issue Feb 16, 2022 · 1 comment · Fixed by #739
Closed

warning sha.h is deprecated, use sha_parallel_engine.h #738

societyofrobots opened this issue Feb 16, 2022 · 1 comment · Fixed by #739
Labels

Comments

@societyofrobots
Copy link

societyofrobots commented Feb 16, 2022

Getting this compile warning with core 2.0.2. I don't even know where to start to resolve it...

In file included from C:\Users\X\Documents\Arduino\libraries\WebSockets\src\WebSockets.cpp:45:
C:\Users\X\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.2/tools/sdk/esp32/include/mbedtls/port/include/esp32/sha.h:20:2: warning: #warning esp32/sha.h is deprecated, please use sha_parallel_engine.h instead [-Wcpp]
 #warning esp32/sha.h is deprecated, please use sha_parallel_engine.h instead
@khoih-prog
Copy link
Contributor

khoih-prog commented Feb 17, 2022

From esp32 core v1.0.6 to latest v2.0.2, the warning is inside sha.h as follows

sha.h

#pragma once

#include "sha/sha_parallel_engine.h"

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

To suppress the warning, just replace

#if ESP_IDF_VERSION_MAJOR >= 4
#include <esp32/sha.h>
#else
#include <hwcrypto/sha.h>
#endif

with

  #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

Check PR #739

khoih-prog added a commit to khoih-prog/WebSockets_Generic that referenced this issue Feb 18, 2022
### Release v2.14.0

1. Suppress unnecessary warnings.
2. Don't use `deprecated sha.h` for ESP32 core v1.0.6+. Check [warning sha.h is deprecated, use sha_parallel_engine.h #738](Links2004/arduinoWebSockets#738)
3. Optimize code by passing by `reference` instead of `value`
4. Modify nearly all examples
5. Update `Packages' Patches`
khoih-prog added a commit to khoih-prog/WebSockets_Generic that referenced this issue Feb 18, 2022
### Release v2.14.0

1. Suppress unnecessary warnings.
2. Don't use `deprecated sha.h` for ESP32 core v1.0.6+. Check [warning sha.h is deprecated, use sha_parallel_engine.h #738](Links2004/arduinoWebSockets#738)
3. Optimize code by passing by `reference` instead of `value`
4. Modify nearly all examples
5. Update `Packages' Patches`
khoih-prog added a commit to khoih-prog/WebSockets_Generic that referenced this issue Feb 18, 2022
### Release v2.14.0

1. Suppress unnecessary warnings.
2. Don't use `deprecated sha.h` for ESP32 core v1.0.6+. Check [warning sha.h is deprecated, use sha_parallel_engine.h #738](Links2004/arduinoWebSockets#738)
3. Optimize code by passing by `reference` instead of `value`
4. Modify nearly all examples
5. Update `Packages' Patches`
khoih-prog added a commit to khoih-prog/WebSockets_Generic that referenced this issue Feb 18, 2022
### Release v2.14.0

1. Suppress unnecessary warnings.
2. Don't use `deprecated sha.h` for ESP32 core v1.0.6+. Check [warning sha.h is deprecated, use sha_parallel_engine.h #738](Links2004/arduinoWebSockets#738)
3. Optimize code by passing by `reference` instead of `value`
4. Modify nearly all examples
5. Update `Packages' Patches`
@Links2004 Links2004 added the ESP32 label Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants