summaryrefslogtreecommitdiff
path: root/tests/extmod/ussl_basic.py
AgeCommit message (Collapse)Author
2023-06-08tests: Replace umodule with module everywhere.Jim Mussared
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-07-18tests/extmod/ussl_basic: Make test run on axtls and mbedtls.Damien George
Fixes issue #4364. Signed-off-by: Damien George <damien@micropython.org>
2020-07-20extmod/modussl: Improve exception error messages.Thorsten von Eicken
This commit adds human readable error messages when mbedtls or axtls raise an exception. Currently often just an EIO error is raised so the user is lost and can't tell whether it's a cert error, buffer overrun, connecting to a non-ssl port, etc. The axtls and mbedtls error raising in the ussl module is modified to raise: OSError(-err_num, "error string") For axtls a small error table of strings is added and used for the second argument of the OSErrer. For mbedtls the code uses mbedtls' built-in strerror function, and if there is an out of memory condition it just produces OSError(-err_num). Producing the error string for mbedtls is conditional on them being included in the mbedtls build, via MBEDTLS_ERROR_C.
2020-03-30tests: Format all Python code with black, except tests in basics subdir.David Lechner
This adds the Python files in the tests/ directory to be formatted with ./tools/codeformat.py. The basics/ subdirectory is excluded for now so we aren't changing too much at once. In a few places `# fmt: off`/`# fmt: on` was used where the code had special formatting for readability or where the test was actually testing the specific formatting.
2019-04-30tests/ussl_basic: Disable setblocking() calls.Paul Sokolovsky
Now that setblocking() is implemented in modussl_axtls, it calls into the underlying stream object, and io.BytesIO doesn't have setblocking().
2017-07-20extmod/modussl_axtls: Allow to close ssl stream multiple times.Paul Sokolovsky
Make sure that 2nd close has no effect and operations on closed streams are handled properly.
2017-06-10tests: Convert remaining "sys.exit()" to "raise SystemExit".Paul Sokolovsky
2017-03-09tests/extmod: Add very basic feature test for ussl module.Damien George
This test just tests that the basic functions/methods can be called with the appropriate arguments. There is no real test of underlying functionality. Thanks to @hosaka for the initial implementation of this test.