Skip to content

Commit 5a9a26d

Browse files
committed
fix indent and 1 missing import
1 parent 8556de6 commit 5a9a26d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pymdoccbor/mso/issuer.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from pymdoccbor.tools import shuffle_dict
2020
from cryptography import x509
2121
from cryptography.hazmat.primitives import serialization
22+
from cryptography.x509 import Certificate
2223

2324

2425
from cbor_diag import *
@@ -223,10 +224,10 @@ def sign(
223224
_err_msg = f"Certificate at {self.cert_path} could not be loaded as DER"
224225
logger.error(_err_msg)
225226

226-
if _parsed_cert:
227-
cert = _parsed_cert
228-
else:
229-
raise Exception(f"Certificate at {self.cert_path} failed parse")
227+
if _parsed_cert:
228+
cert = _parsed_cert
229+
else:
230+
raise Exception(f"Certificate at {self.cert_path} failed parse")
230231
_cert = cert.public_bytes(getattr(serialization.Encoding, "DER"))
231232
else:
232233
_cert = self.selfsigned_x509cert()

0 commit comments

Comments
 (0)