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

wolfssh_template / wolfssh_echoserver don't build #697

Closed
keredson opened this issue May 21, 2024 · 5 comments
Closed

wolfssh_template / wolfssh_echoserver don't build #697

keredson opened this issue May 21, 2024 · 5 comments
Assignees

Comments

@keredson
Copy link

keredson commented May 21, 2024

to replicate:

$ idf.py --version
ESP-IDF v5.2.1
$ idf.py create-project-from-example "wolfssl/wolfssh^1.4.15-stable-preview6:wolfssh_template"
[...]
$ cd wolfssh_template/
$ idf.py build
[...]
/tmp/wolfssh_template/managed_components/wolfssl__wolfssl/wolfssl/wolfcrypt/port/Espressif/esp32-crypt.h:890:10: error: #error "ESP32_CRYPT_HASH_SHA256 not supported on wolfSSL at this time"
  890 |         #error "ESP32_CRYPT_HASH_SHA256 not supported on wolfSSL at this time"
      |          ^~~~~
ninja: build stopped: subcommand failed.

same error for wolfssh_echoserver. this is on an esp32.

@keredson
Copy link
Author

keredson commented May 21, 2024

workaround:

  1. move managed_components/wolfssl__wolfssl to components/wolfssl__wolfssl.
  2. in ./components/wolfssl__wolfssl/include/user_settings.h, add the following inside #if defined(CONFIG_IDF_TARGET_ESP32):
#define NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256

this leads to a bunch of sha244 related build errors, so
3. comment out #define WOLFSSL_SHA224 in that same file.

and it works.

@embhorn
Copy link
Member

embhorn commented May 21, 2024

Hi @keredson

Thanks for this report. Could you tell us a bit about your project using wolfSSH?

I've requested a review of this issue by our engineers.

@gojimmypi
Copy link
Contributor

Hi @keredson and @embhorn

I've been able to reproduce this problem. The issue was related to concurrent SHA HW/SW interleave calculations and fixed in post 5.7.0 release in wolfSSL/wolfssl#7505.

As an interim solution:

  • rename wolfssh_template/managed_components to wolfssh_template/components
  • edit the CMakeLists.txt in wolfssh_template/components/wolfssl__wolfssl. Uncomment and set WOLFSSL_ROOT:
# Optionally set your source to wolfSSL in your project CMakeLists.txt like this:
set(WOLFSSL_ROOT "/mnt/c/workspace/wolfssl-gojimmypi-pr" )

Set the WOLFSSL_ROOT to the fully qualified path of a local, fresh clone of wolfssl.

I will update the published wolfSSL Managed Component this week.

@keredson
Copy link
Author

🎉

@gojimmypi
Copy link
Contributor

Hi @keredson

I see you've already closed this issue. Not sure if perhaps you saw some of my work in progress at the Expressif Registry.

I've updated the published components as noted in #699

wolfSSH: https://components.espressif.com/components/wolfssl/wolfssh/versions/1.4.17-preview1m5

and

wolfSSL: https://components.espressif.com/components/wolfssl/wolfssl/versions/5.7.1-preview2d?language=en

I believe the examples should be working much better now. Please take it for a test drive and let me know how it goes.

The updated (preview) echoserver can be found here:

https://components.espressif.com/components/wolfssl/wolfssh/versions/1.4.17-preview1m5/examples/wolfssh_echoserver

idf.py create-project-from-example "wolfssl/wolfssh^1.4.17-preview1m5:wolfssh_echoserver"

Thank you.

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

3 participants