This repository has been archived by the owner on Jan 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 436
mbed TLS client & server support (WIP) #90
Open
Bmooij
wants to merge
44
commits into
me-no-dev:master
Choose a base branch
from
Bmooij:mbed-tls
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…th the handshake failing.
…sion added all SSL stuff between defines. In order to enable SSL add -DASYNC_TCP_SSL_ENABLED to your build flags.
… released version of arduino-esp32...
…er library is also used.
* Fix LoadProhibited (me-no-dev#73) * Use sizeof instead of strlen for const char[] * Add Kconfig option to control ASYNC_TCP_SSL_ENABLED * Optionally include ssl header files * Add null check for psk_ident and pskey * Do not default to PSK when root_ca is not explcitly set. tcp_ssl_new_client() has a case to handle this. * Move psk null checks to top of function, remove unneeded include, syntax cleanup. Authored-by: Bob <[email protected]>
Bmooij
changed the title
mbed TLS client & server support
mbed TLS client & server support (WIP)
Apr 16, 2020
Any news on this? |
Would this also enable TLS/SSL for Server side Web Sockets ?? |
Hey, is there any code sample to try the client part? I've tried to make https requests, but I'm missing libraries to build the AsyncTCP with this branch, any help would be much appreciated :) Compilation errors:
|
@@ -389,7 +389,7 @@ int tcp_ssl_new_server(struct tcp_pcb *tcp, void *arg, const char *cert, const s | |||
TCP_SSL_DEBUG("Seeding the random number generator...\n" ); | |||
ret = mbedtls_ctr_drbg_seed(&tcp_ssl->drbg_ctx, mbedtls_entropy_func, &tcp_ssl->entropy_ctx, | |||
(const unsigned char *) pers, | |||
strlen(pers)); | |||
sizeof(pers)); |
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 understand strlen appears as risky, but taking sizeof here does not return the same numeric value.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
I started implementing the server side TLS support.
I used the implementation provided by @tve #48
It is not finished yet!
Currently the first request can successfully be made with HTTPS and processed.
The next HTTPS request could not be processed, and fails.
I'm looking for feedback on the implementation, and help with the last issue.
Any help is appreciated.
For quick testing I made a sample project that could be used with PlatformIO.
https://github.com/Bmooij/AsyncTCP-https-server-example
Thanks!