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

Update SSH to UART example for ESP-IDF v5.x, in-place cmake #4

Merged
merged 3 commits into from
Feb 7, 2024

Conversation

gojimmypi
Copy link
Contributor

@gojimmypi gojimmypi commented Jan 26, 2024

This PR updates the ESP32 SSH to UART example to work with the Espressif ESP-IDF v5.x environment, as well as use the updated CMakeLists.txt file that allows for in-place compiling without needing to copy wolfssl and/or wolfssh locally to the project.

Note that for best results, wolfSSL/wolfssl#7173 and wolfSSL/wolfssh#649 should be merged first.

There's a known problem with SHA256 HW Acceleration for this project, so it has been disabled in the local components/wolfssl/user_settings.h with NO_WOLFSSL_ESP32_CRYPT_HASH_SHA256. A solution for that is still WIP.

See enclosed README.md files for more details.

Edit:

Note the wolfSSL and wolfSSH libraries need to be findable by the cmake file. If everything is cloned from the same directory, it should automatically just work.

The cmake file will look for wolfssh-username and wolfssl-username directories, and then look for wolfssh and wolfssl directories when the WOLFSSL_ROOT and/or WOLFSSH_ROOT environment variables are not defined.

For example, if everything is cloned from the C:\workspace directory:

c:\workspace\
c:\workspace\wolfssl
c:\workspace\wolfssh
c:\workspace\wolfssh-examples

The project at c:\workspace\wolfssh-examples\Espressif\ESP32\ESP32-SSH-Server should be able to find wolfSSL and wolfSSH libraries in the above structure.

If instead the wolfssh-examples is cloned to c:\test\wolfssh-examples, then the user must define the locations of wolfSSL and wolfSSH libraries manually.

The directories can be defined as described in the README.md in the project CMakeLists.txt

At some point once the codebase is all stabilized, we may consider using Managed Components that would allow for a "clone & run" with relatively little fuss.

See wolfSSL/wolfssl#6234 for a roadmap of Espressif updates.

@gojimmypi gojimmypi self-assigned this Jan 26, 2024
@gojimmypi gojimmypi marked this pull request as draft January 26, 2024 00:26
@gojimmypi gojimmypi marked this pull request as ready for review January 26, 2024 00:33
@gojimmypi gojimmypi added enhancement New feature or request examples labels Jan 26, 2024
ejohnstown
ejohnstown previously approved these changes Feb 5, 2024
Copy link
Contributor

@ejohnstown ejohnstown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I'm fine with this. A couple things:

  1. Copyright years. This is something that will be updated next release.
  2. One or two files had comments with their file path. They weren't updated from when they used to be wolfSSL files.
  3. Several files are missing an LF on the last line. I'm guessing this is a VSCode thing.
  4. Several files have C++ style comments instead of only C style. Again, probably a VSCode thing.

If this runs fine for Hide-san for his needs, this can be merged. While I marked Approve, it is conditional on Hide.

@gojimmypi
Copy link
Contributor Author

In general I'm fine with this. A couple things: [Copyright / License / LF / Comment Style]

@ejohnstown I've pushed an update to address these items. I'll squash when ready to merge, if desired.

@ejohnstown ejohnstown removed their assignment Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants