Skip to content

Commit 449bd65

Browse files
committedOct 8, 2022
ucloud: Load root CA file from DER for MicroPython.
* MicroPython now supports verifying root CA, passed as binary blob in cadata.
·
v1.4.1v0.0.5
1 parent 522e3a4 commit 449bd65

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎arduino_iot_cloud/ucloud.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,12 @@ def __init__(
195195
if "keyfile" in ssl_params and "der" in ssl_params["keyfile"]:
196196
with open(ssl_params.pop("keyfile"), "rb") as f:
197197
ssl_params["key"] = f.read()
198+
if "certfile" in ssl_params and "der" in ssl_params["certfile"]:
198199
with open(ssl_params.pop("certfile"), "rb") as f:
199200
ssl_params["cert"] = f.read()
201+
if "ca_certs" in ssl_params and "der" in ssl_params["ca_certs"]:
202+
with open(ssl_params.pop("ca_certs"), "rb") as f:
203+
ssl_params["cadata"] = f.read()
200204

201205
# If no server/port were passed in args, set the default server/port
202206
# based on authentication type.

0 commit comments

Comments
 (0)
Please sign in to comment.