Skip to content

Commit 1827086

Browse files
authored
Apply suggestions from code review
1 parent cffd8a0 commit 1827086

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ mdoc = mdoci.new(
102102
doctype="eu.europa.ec.eudiw.pid.1",
103103
data=PID_DATA,
104104
devicekeyinfo=PKEY # TODO
105-
cert_path="/path/"
105+
# cert_path="/path/"
106106
)
107107
108108
mdoc

pymdoccbor/mdoc/issuer.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ def __init__(
4747
if private_key:
4848
if isinstance(private_key, dict):
4949
self.private_key = CoseKey.from_dict(private_key)
50+
elif isinstance(private_key, EC2Key):
51+
ec2_encoded = private_key.encode()
52+
ec2_decoded = CoseKey.decode(ec2_encoded)
53+
self.private_key = ec2_decoded
5054
elif isinstance(private_key, CoseKey):
5155
self.private_key = private_key
5256
else:
@@ -173,7 +177,7 @@ def new(
173177
"status": self.status,
174178
}
175179

176-
# print("mso diganostic notation: \n", cbor2diag(mso_cbor))
180+
logger.debug(f"MSO diagnostic notation: {cbor2diag(mso_cbor)}")
177181

178182
self.signed = res
179183
return self.signed

0 commit comments

Comments
 (0)