summaryrefslogtreecommitdiff
path: root/tests/extmod/ussl_basic.py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2019-03-01 23:48:16 +0300
committerDamien George <damien.p.george@gmail.com>2019-04-30 17:26:37 +1000
commitc76445315f836eb75835814ebe97e14107adbf0f (patch)
treebb333f5bd5ff2fd85dba4e75548de3c03a3f509e /tests/extmod/ussl_basic.py
parent9c7c082396f717a8a8eb845a0af407e78d38165f (diff)
extmod/modussl_axtls: Add non-blocking mode support.
It consists of: 1. "do_handhake" param (default True) to wrap_socket(). If it's False, handshake won't be performed by wrap_socket(), as it would be done in blocking way normally. Instead, SSL socket can be set to non-blocking mode, and handshake would be performed before the first read/write request (by just returning EAGAIN to these requests, while instead reading/writing/ processing handshake over the connection). Unfortunately, axTLS doesn't really support non-blocking handshake correctly. So, while framework for this is implemented on MicroPython's module side, in case of axTLS, it won't work reliably. 2. Implementation of .setblocking() method. It must be called on SSL socket for blocking vs non-blocking operation to be handled correctly (for example, it's not enough to wrap non-blocking socket with wrap_socket() call - resulting SSL socket won't be itself non-blocking). Note that .setblocking() propagates call to the underlying socket object, as expected.
Diffstat (limited to 'tests/extmod/ussl_basic.py')
0 files changed, 0 insertions, 0 deletions