add modussl_mbedtls.c methods and exceptions. esp32/unix #5436
add modussl_mbedtls.c methods and exceptions. esp32/unix #5436tuxlinuxien wants to merge 2 commits intomicropython:masterfrom
Conversation
|
Interesting addition / fix! |
|
@tve I can understand that my PR is not really important for micropython unix port. I had done these changes in order to build my own http library that works well in china (TCP and SSL are definitely not stable here if I try to ping a server outside of the GFW). I also don't like the idea of using Since mbedTLS makes the distinction between Sorry that I couldn't do that for axTLS as well. |
|
Related #5840 |
|
@dpgeorge should I remove this merge request? |
Not at this stage, I think it's a valid alternative to consider for non-blocking SSL. |
_stage: Fix handling of scaled display in the stage library
|
Non-blocking SSL sockets have been implemented in a different way in ed58d6e |
|
See also related commit ef71028 |
Changes
This pull requests adds:
methods to ussl (mbedtls version only) plus few exceptions.
The goal is to fully support non-blocking ssl sockets and reduce the number of call to poll by throwing the exact I/O error like
SSL_WANT_READorSSL_WANT_WRITE. the user has now the possibility to calldo_handshake()later ifussl.wrap_socketwas set withdo_handshake = FalseTests
successfully tested on micropython/ports/esp-32 (esp-ifd rev 6ccb4cf) and micropython/ports/unix
Example