mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
tests/net_inet: Skip tests on axTLS when necessary.
These tests cannot run with axTLS, eg on esp8266. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -2,6 +2,10 @@ import ssl
|
||||
import os
|
||||
import asyncio
|
||||
|
||||
if not hasattr(ssl, "CERT_REQUIRED"):
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
# This certificate was obtained from micropython.org using openssl:
|
||||
# $ openssl s_client -showcerts -connect micropython.org:443 </dev/null 2>/dev/null
|
||||
# The certificate is from Let's Encrypt:
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import socket
|
||||
import ssl
|
||||
|
||||
if not hasattr(ssl, "CERT_REQUIRED"):
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
# This certificate was obtained from micropython.org using openssl:
|
||||
# $ openssl s_client -showcerts -connect micropython.org:443 </dev/null 2>/dev/null
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
import sys, errno, select, socket, ssl
|
||||
|
||||
if not hasattr(ssl, "CERT_REQUIRED"):
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
|
||||
def test(addr, hostname, block=True):
|
||||
print("---", hostname)
|
||||
|
||||
@@ -2,6 +2,10 @@ import os
|
||||
import socket
|
||||
import ssl
|
||||
|
||||
if not hasattr(ssl, "CERT_REQUIRED"):
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
# This certificate was obtained from micropython.org using openssl:
|
||||
# $ openssl s_client -showcerts -connect micropython.org:443 </dev/null 2>/dev/null
|
||||
# The certificate is from Let's Encrypt:
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
import socket, ssl, errno, sys, time, select
|
||||
|
||||
# Although this test doesn't need ssl.CERT_REQUIRED, it does require the ssl module
|
||||
# to support modern ciphers. So exclude the test on axTLS which doesn't have
|
||||
# CERT_REQUIRED.
|
||||
if not hasattr(ssl, "CERT_REQUIRED"):
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
|
||||
def test_one(site, opts):
|
||||
ai = socket.getaddrinfo(site, 443, socket.AF_INET)
|
||||
|
||||
Reference in New Issue
Block a user