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

mbed TLS client & server support (WIP) #90

Open
wants to merge 44 commits into
base: master
Choose a base branch
from

Conversation

Bmooij
Copy link
Contributor

@Bmooij Bmooij commented Apr 16, 2020

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!

fremouw and others added 30 commits September 26, 2018 10:00
…sion added all SSL stuff between defines. In order to enable SSL add -DASYNC_TCP_SSL_ENABLED to your build flags.
tve and others added 10 commits September 25, 2019 21:10
* 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 <bob.mooij@gmail.com>
@Bmooij Bmooij changed the title mbed TLS client & server support mbed TLS client & server support (WIP) Apr 16, 2020
@zekageri
Copy link

Any news on this?

@frippe75
Copy link

frippe75 commented Aug 5, 2020

Would this also enable TLS/SSL for Server side Web Sockets ??
Looked long and hard for that.... :-)

@RomeHein
Copy link

RomeHein commented Nov 13, 2020

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:

libraries/asyncHTTPrequest/asyncHTTPrequest.cpp.o:(.literal._ZN16asyncHTTPrequest8_connectEv+0x28): undefined reference to `AsyncClient::AsyncClient(tcp_pcb*, tcp_pcb*)'
Multiple libraries were found for "FS.h"
libraries/asyncHTTPrequest/asyncHTTPrequest.cpp.o:(.literal._ZN16asyncHTTPrequest8_connectEv+0x2c): undefined reference to `AsyncClient::connect(char const*, unsigned short, bool)'

@@ -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));
Copy link
Contributor

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants