Skip to content

Commit dc82433

Browse files
authored
Merge pull request #23 from bcmi-labs/ca_root
ucloud: Load root CA file from DER for MicroPython.
2 parents 522e3a4 + 449bd65 commit dc82433

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)