-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add patch that adds support for wolfssl TLS sockets in zephyr #195
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## How to setup wolfSSL support for standard Zephyr TLS Sockets and RNG | ||
|
||
wolfSSL can also be used as the underlying implementation for the default Zephyr TLS socket interface. | ||
With this enabled, all existing applications using the Zephyr TLS sockets will now use wolfSSL inside | ||
for all TLS operations. This will also enable wolfSSL as the default RNG implementation. To enable this | ||
feature, first ensure wolfSSL has been added to the west manifest using the instructions from the | ||
README.md here: https://github.com/wolfSSL/wolfssl/tree/master/zephyr | ||
|
||
Once the west manifest has been updated, run west update, then run the following command to patch the sources | ||
|
||
``` | ||
patch -p1 < /path/to/your/osp/zephyr/zephyr-tls-{PATCH_VERSION}.patch | ||
``` | ||
|
||
Where PATCH_VERSION is the appropriate patch version. | ||
|
||
### Run Zephyr TLS samples | ||
|
||
``` | ||
west build -b <your_board> samples/net/sockets/echo_server -DEXTRA_CONF_FILE=overlay-wolfssl.conf | ||
``` | ||
|
||
### Run Zephyr TLS tests | ||
|
||
``` | ||
west build -b <your_board> tests/net/socket/tls_ext/ -DEXTRA_CONF_FILE=overlay-wolfssl.conf | ||
``` | ||
|
||
``` | ||
west build -b <your_board> tests/net/socket/tls/ -DEXTRA_CONF_FILE=overlay-wolfssl.conf | ||
``` | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the zephyr/include.am to include these with EXTRA_DIST so they are included with a "make dist"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So all new files are part of the patch. I dont think the new overlay files should go in EXTRA_DIST as they arent needed, and will not exist, for zephyr users that dont use the patch. Also these new files arent really part of the zephyr wolfssl external module, they are specifically extensions of the zephyr samples so I dont know if it makes sense for extensions of zephyr samples to be in a wolfssl distribution right? Especially since the associated changes in zephyr sockets_tls.c wont necessarily be there, meaning we are then distributing overlays that are dependent on external changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want these files part of the wolfssl download package or the commercial release? In my opinion all files need to be included... Please add to the zephyr/include.am these two new files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can look at trying to do a conditional add but im still not so sure. "Do you want these files part of the wolfssl download package or the commercial release?" I think these changes should be bound to the changes in the zephyr sources. So if those changes to the zephyr sources arent part of the wolfssl download package or commercial release then I believe these should also not be included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't have to be conditional. Always include as EXTRA_DIST+=....