File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 19
19
from pymdoccbor .tools import shuffle_dict
20
20
from cryptography import x509
21
21
from cryptography .hazmat .primitives import serialization
22
+ from cryptography .x509 import Certificate
22
23
23
24
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"
224
225
logger .error (_err_msg )
225
226
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" )
230
231
_cert = cert .public_bytes (getattr (serialization .Encoding , "DER" ))
231
232
else :
232
233
_cert = self .selfsigned_x509cert ()
You can’t perform that action at this time.
0 commit comments