tests/extmod: Add test for passing cadata into ssl.wrap_socket().
For coverage. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
b50da3dbd7
commit
9900eaa269
|
@ -0,0 +1,14 @@
|
||||||
|
# Test ssl.wrap_socket() with cadata passed in.
|
||||||
|
|
||||||
|
try:
|
||||||
|
import io
|
||||||
|
import ssl
|
||||||
|
except ImportError:
|
||||||
|
print("SKIP")
|
||||||
|
raise SystemExit
|
||||||
|
|
||||||
|
# Invalid cadata.
|
||||||
|
try:
|
||||||
|
ssl.wrap_socket(io.BytesIO(), cadata=b"!")
|
||||||
|
except ValueError as er:
|
||||||
|
print(repr(er))
|
|
@ -0,0 +1 @@
|
||||||
|
ValueError('invalid cert',)
|
Loading…
Reference in New Issue