-
Notifications
You must be signed in to change notification settings - Fork 442
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
mbed TLS client & server support (WIP) #90
base: master
Are you sure you want to change the base?
Conversation
…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]>
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.
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!