We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8556de6 commit 5a9a26dCopy full SHA for 5a9a26d
pymdoccbor/mso/issuer.py
@@ -19,6 +19,7 @@
19
from pymdoccbor.tools import shuffle_dict
20
from cryptography import x509
21
from cryptography.hazmat.primitives import serialization
22
+from cryptography.x509 import Certificate
23
24
25
from cbor_diag import *
@@ -223,10 +224,10 @@ def sign(
223
224
_err_msg = f"Certificate at {self.cert_path} could not be loaded as DER"
225
logger.error(_err_msg)
226
- if _parsed_cert:
227
- cert = _parsed_cert
228
- else:
229
- raise Exception(f"Certificate at {self.cert_path} failed parse")
+ if _parsed_cert:
+ cert = _parsed_cert
+ else:
230
+ raise Exception(f"Certificate at {self.cert_path} failed parse")
231
_cert = cert.public_bytes(getattr(serialization.Encoding, "DER"))
232
else:
233
_cert = self.selfsigned_x509cert()
0 commit comments