-
Notifications
You must be signed in to change notification settings - Fork 109
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 minimal support for ssl module using Mbed TLS and sockets #929
Conversation
54d78d2
to
74bb97e
Compare
74bb97e
to
977304e
Compare
Looks all good. Maybe this might be the first component implementing this structure: #930 |
Is it your feeling that this is not mature enough to have a place in the Programmer's Guide? Do we want to implement PXIX certificate chain validation first? (As it is, I believe the current implementation would be vulnerable to MitM attacks, without authentication). |
Add support for ssl client in binary and passive modes, with no certificate verification Add APIs to otp_socket so it can be called from ssl bio callbacks Fix a bug in lwIP otp_socket's recv revealed by ssl tests Fix a bug in BSD otp_socket's recvfrom revealed by refactoring Fix a bug in esp32 tests where main context and its resources were not properly destroyed Update documentation and workflows to reflect the requirement on Mbed TLS Fix exported types of inet module Signed-off-by: Paul Guyot <pguyot@kallisys.net>
977304e
to
71cc082
Compare
There are still a lot of open points in #930 proposal, so let's just focus in merging this PR, and let's take care of reorganizing code as soon all open points are closed. |
Proper documentation for an ssl module would both require a stable API and a reasonable amount of work, in order to explain caveats and how it differs from OTP one. This kind of work deserves a standalone PR, so let's merge this PR and document ssl module properly as soon as we are ready. |
Details of changes:
This code was tested on:
using atomvm_netbench associated test.
The test takes 0.5s with Erlang/OTP or AtomVM on macOS.
It takes 7.3s then 1.0s on ESP32
It takes 12.0s then from 2.2s to 2.6s on Pico-W
These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).
SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later