MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / load_certificate

Function load_certificate

opcua/crypto/uacrypto.py:15–21  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

13
14
15def load_certificate(path):
16 _, ext = os.path.splitext(path)
17 with open(path, "rb") as f:
18 if ext == ".pem":
19 return x509.load_pem_x509_certificate(f.read(), default_backend())
20 else:
21 return x509.load_der_x509_certificate(f.read(), default_backend())
22
23
24def x509_from_der(data):

Callers 1

uacrypto.pyFile · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected