tests/multi_net: Require SSL cert file to be available for test to run.

These were missed in 2bba507148 because they
didn't use the `os.stat` pattern.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2025-08-27 13:31:18 +10:00
parent af745a5982
commit 3274f0355b
4 changed files with 16 additions and 32 deletions

View File

@@ -14,14 +14,10 @@ PORT = 8000
certfile = "ec_cert.der" certfile = "ec_cert.der"
keyfile = "ec_key.der" keyfile = "ec_key.der"
try: with open(certfile, "rb") as cf:
with open(certfile, "rb") as cf: cert = cadata = cf.read()
cert = cadata = cf.read() with open(keyfile, "rb") as kf:
with open(keyfile, "rb") as kf: key = kf.read()
key = kf.read()
except OSError:
print("SKIP")
raise SystemExit
# Server # Server

View File

@@ -14,14 +14,10 @@ PORT = 8000
cert = cafile = "ec_cert.der" cert = cafile = "ec_cert.der"
key = "ec_key.der" key = "ec_key.der"
try: with open(cafile, "rb") as f:
with open(cafile, "rb") as f: cadata = f.read()
cadata = f.read() with open(key, "rb") as f:
with open(key, "rb") as f: keydata = f.read()
keydata = f.read()
except OSError:
print("SKIP")
raise SystemExit
# Server # Server

View File

@@ -15,14 +15,10 @@ PORT = 8000
cert = cafile = "ec_cert.der" cert = cafile = "ec_cert.der"
key = "ec_key.der" key = "ec_key.der"
try: with open(cafile, "rb") as f:
with open(cafile, "rb") as f: cadata = f.read()
cadata = f.read() with open(key, "rb") as f:
with open(key, "rb") as f: key = f.read()
key = f.read()
except OSError:
print("SKIP")
raise SystemExit
def verify_callback(cert, depth): def verify_callback(cert, depth):

View File

@@ -13,14 +13,10 @@ PORT = 8000
certfile = "ec_cert.der" certfile = "ec_cert.der"
keyfile = "ec_key.der" keyfile = "ec_key.der"
try: with open(certfile, "rb") as cf:
with open(certfile, "rb") as cf: cert = cadata = cf.read()
cert = cadata = cf.read() with open(keyfile, "rb") as kf:
with open(keyfile, "rb") as kf: key = kf.read()
key = kf.read()
except OSError:
print("SKIP")
raise SystemExit
# DTLS server. # DTLS server.