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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a251e59
- very early version with mbed TLS support.
fremouw Sep 26, 2018
d4257e6
improved TLS support, removed some not needed debug statements.
fremouw Oct 25, 2018
eeff609
removed some more logging.
fremouw Oct 25, 2018
f2127a0
getting there, seems to start working, there are still some issues wi…
fremouw Nov 5, 2018
3c9fbd9
add fix for reading larger amounts of data.
fremouw Nov 20, 2018
d501a90
some code clean-up
fremouw Nov 29, 2018
c9dd608
more code clean-up.
fremouw Nov 29, 2018
52e550b
revert IDF changes, so it works with the latest stable IDF.
fremouw Jan 9, 2019
001ae06
Not a fan of defines, but to keep things in line with the esp8266 ver…
fremouw Jan 10, 2019
9f7a918
clean-up
fremouw Jan 11, 2019
5187673
merge origin/idf-update into mbed-tls, as it's now part of the latest…
fremouw Jan 11, 2019
373c334
Merge branch 'master' into mbed-tls
fremouw Jan 15, 2019
d631d7d
add some dummy functions so we can compile when the ESP Async WebServ…
fremouw Jan 15, 2019
78f952e
allow setting a root CA.
fremouw Jan 17, 2019
0879ba2
oops, set debug disabled as default again.
fremouw Jan 17, 2019
ef50357
add ASYNC_TCP_SSL_ENABLED around setRootCa call.
fremouw Jan 18, 2019
3fa9abf
Update README.md
fremouw Mar 2, 2019
5e06389
add support for pre-shared key TLS cipher suites
tve Apr 16, 2019
5e511de
update mbed-tls implementation to account for restructing
tve Jun 25, 2019
8e55be4
don't assign _hostname unless necessary
tve Jun 25, 2019
9cba86e
fix indentation; make SSL timeout a #define
tve Jul 26, 2019
f34df7f
make SSL timeout a #define, 2nd try
tve Jul 26, 2019
7bca0f4
Merge remote-tracking branch 'upstream/master' into mbed-tls-try2
tve Jul 26, 2019
8ef604b
fix while loop in _recv; fix calls into LwIP; add some comments
tve Aug 9, 2019
b7ee312
fix c/c++ linking from tcp_ssl to tcp code
tve Aug 9, 2019
73480f3
TLS fixes: pbuf free bug when reading; add debug printfs; useless ext…
tve Aug 9, 2019
8b52f6c
add minor comment
tve Aug 9, 2019
1e8da66
merge upstream into mbed-tls
tve Sep 24, 2019
8e77fe7
fix Codacy issues
tve Sep 25, 2019
b0b2bac
Merge remote-tracking branch 'upstream/master' into mbed-tls-try2
tve Sep 25, 2019
3cc7048
fix issues with closed_slots
tve Sep 26, 2019
abdd496
Merge branch 'master' into mbed-tls-try2
me-no-dev Oct 14, 2019
44b3d6b
mbed-tls-try2 updates (#3)
robert-alfaro Jan 22, 2020
540bf7d
fix codacity strlen issues
tve Jan 22, 2020
3d67ffe
Merge branch 'master' into mbed-tls-try2
tve Jan 22, 2020
59f83d8
add client certificate authentication
r3no1t Jan 2, 2020
5ceb4db
Init server implementation
bmooij-beeliners Apr 15, 2020
6bac001
Move stuff from AsyncTCP to tcp_mbedtls
bmooij-beeliners Apr 16, 2020
dbe391c
implement free ssl free for server clients
bmooij-beeliners Apr 16, 2020
4c260fb
Update server handshake flow
bmooij-beeliners Apr 16, 2020
535aa27
Fix code when ASYNC_TCP_SSL_ENABLED is not enabled
bmooij-beeliners Apr 16, 2020
ab8091e
Fix 2 issues found by PR Quality Review
bmooij-beeliners Apr 16, 2020
d763bf1
Fix freeing ssl tcp
bmooij-beeliners Apr 16, 2020
51df5da
Fix cleaning ssl connection
bmooij-beeliners Apr 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ set(COMPONENT_REQUIRES
register_component()

target_compile_options(${COMPONENT_TARGET} PRIVATE -fno-rtti)

if(CONFIG_ASYNC_TCP_SSL_ENABLED)
target_compile_options(${COMPONENT_TARGET} PRIVATE -DASYNC_TCP_SSL_ENABLED)
endif()
6 changes: 6 additions & 0 deletions Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,10 @@ config ASYNC_TCP_USE_WDT
help
Enable WDT for the AsyncTCP task, so it will trigger if a handler is locking the thread.

config ASYNC_TCP_SSL_ENABLED
bool "Enable SSL for AsyncTCP client"
default "n"
help
Enables mbedTLS support for AsyncTCP clients.

endmenu
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ This library is the base for [ESPAsyncWebServer](https://github.com/me-no-dev/ES

## AsyncClient and AsyncServer
The base classes on which everything else is built. They expose all possible scenarios, but are really raw and require more skills to use.

## TLS support
Support for TLS is added using mbed TLS, for now only the client part is supported. You can enable this by adding the flag ASYNC_TCP_SSL_ENABLED to your build flags (-DASYNC_TCP_SSL_ENABLED). If you'd like to set a root certificate you can use the setRootCa function on AsyncClient. Feel free to add support for the server side as well :-)

In addition to the regular certificate based cipher suites there is also support for Pre-Shared Key
cipher suites. Use `setPsk` to define the PSK identifier and PSK itself. The PSK needs to be
provided in the form of a hex string (and easy way to generate a PSK is to use md5sum).
Loading