diff options
author | Damien George <damien@micropython.org> | 2024-01-29 15:11:46 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-01-29 15:11:46 +1100 |
commit | d5b96813dcdd40e19a59e220d73a4fba5ab85fbe (patch) | |
tree | 2b0dd580ea8d11a6712fb38c78f98dc0f05c9c85 /tests/extmod/ssl_sslcontext_ciphers.py | |
parent | 46e833b071174ca18fbeae993a725d8c57da88a6 (diff) | |
download | micropython-d5b96813dcdd40e19a59e220d73a4fba5ab85fbe.tar.gz micropython-d5b96813dcdd40e19a59e220d73a4fba5ab85fbe.zip |
extmod/modssl_mbedtls: Fix cipher iteration in SSLContext.get_ciphers.
Prior to this commit it would skip every second cipher returned from
mbedtls.
The corresponding test is also updated and now passes on esp32, rp2, stm32
and unix.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/extmod/ssl_sslcontext_ciphers.py')
-rw-r--r-- | tests/extmod/ssl_sslcontext_ciphers.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/extmod/ssl_sslcontext_ciphers.py b/tests/extmod/ssl_sslcontext_ciphers.py index d87e96afdf..20c00b9176 100644 --- a/tests/extmod/ssl_sslcontext_ciphers.py +++ b/tests/extmod/ssl_sslcontext_ciphers.py @@ -12,7 +12,9 @@ ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) ciphers = ctx.get_ciphers() for ci in ciphers: - print(ci) + # Only print those ciphers know to exist on all ports. + if ("TLS-ECDHE-ECDSA-WITH-AES" in ci or "TLS-RSA-WITH-AES" in ci) and "CBC" in ci: + print(ci) ctx.set_ciphers(ciphers[:1]) |