summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-07-31 13:49:16 +1000
committerDamien George <damien@micropython.org>2025-10-20 12:06:39 +1100
commit3b46c0018a0656bd98f0320efb00c11c268b44d3 (patch)
treebb7bc81158b75c93dd886af82d3942487d6718a1
parentc5c03e74ab207ef1c97f6dffe955669e8237a334 (diff)
tests/net_hosted/ssl_verify_callback.py: Skip if no verify_callback.
axTLS does not implement the `verify_callback` attribute. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--tests/net_hosted/ssl_verify_callback.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/net_hosted/ssl_verify_callback.py b/tests/net_hosted/ssl_verify_callback.py
index 0dba4e4fd..cd03ff49d 100644
--- a/tests/net_hosted/ssl_verify_callback.py
+++ b/tests/net_hosted/ssl_verify_callback.py
@@ -4,6 +4,12 @@ import io
import socket
import tls
+context = tls.SSLContext(tls.PROTOCOL_TLS_CLIENT)
+
+if not hasattr(context, "verify_callback"):
+ print("SKIP")
+ raise SystemExit
+
def verify_callback(cert, depth):
print("verify_callback:", type(cert), len(cert) > 100, depth)
@@ -16,7 +22,6 @@ def verify_callback_fail(cert, depth):
def test(peer_addr):
- context = tls.SSLContext(tls.PROTOCOL_TLS_CLIENT)
context.verify_mode = tls.CERT_OPTIONAL
context.verify_callback = verify_callback
s = socket.socket()