kopia lustrzana https://github.com/micropython/micropython
f3f215e9bd
This commit adds: 1) Methods to SSLContext class that match CPython signature: - `SSLContext.load_cert_chain(certfile, keyfile)` - `SSLContext.load_verify_locations(cafile=, cadata=)` - `SSLContext.get_ciphers()` --> ["CIPHERSUITE"] - `SSLContext.set_ciphers(["CIPHERSUITE"])` 2) `sslsocket.cipher()` to get current ciphersuite and protocol version. 3) `ssl.MBEDTLS_VERSION` string constant. 4) Certificate verification errors info instead of `MBEDTLS_ERR_X509_CERT_VERIFY_FAILED`. 5) Tests in `net_inet` and `multi_net` to test these new methods. `SSLContext.load_cert_chain` method allows loading key and cert from disk passing a filepath in `certfile` or `keyfile` options. `SSLContext.load_verify_locations`'s `cafile` option enables the same functionality for ca files. Signed-off-by: Carlos Gil <carlosgilglez@gmail.com> |
||
---|---|---|
.. | ||
README | ||
asyncio_cancel_stream.py | ||
asyncio_cancel_stream.py.exp | ||
asyncio_open_connection.py | ||
asyncio_open_connection.py.exp | ||
asyncio_tcp_read_headers.py | ||
asyncio_tcp_read_headers.py.exp | ||
getaddrinfo.py | ||
mpycert.der | ||
ssl_cert.py | ||
ssl_cert.py.exp | ||
ssl_errors.py | ||
test_sslcontext_client.py | ||
test_sslcontext_client.py.exp | ||
test_tls_nonblock.py | ||
test_tls_sites.py | ||
test_tls_sites.py.exp | ||
tls_num_errors.py | ||
tls_num_errors.py.exp | ||
tls_text_errors.py |
README
This directory contains network tests which require Internet connection. Note that these tests are not run as part of the main testsuite and need to be run separately (from the main test/ directory): ./run-tests.py net_inet/*.py