File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 22import cryptography
33import logging
44
5- from pycose .keys import CoseKey , EC2Key
5+ from pycose .keys import EC2Key
66from pycose .messages import Sign1Message
77
88from pymdoccbor .exceptions import (
@@ -52,7 +52,7 @@ def __init__(self, data: cbor2.CBORTag) -> None:
5252 f"MsoParser only supports raw bytes and list, a { type (data )} was provided"
5353 )
5454
55- self .object .key : CoseKey | None = None
55+ self .object .key = None
5656 self .public_key : cryptography .hazmat .backends .openssl .ec ._EllipticCurvePublicKey = None
5757 self .x509_certificates : list = []
5858
@@ -130,9 +130,8 @@ def load_public_key(self) -> None:
130130
131131 key = EC2Key (
132132 crv = settings .COSEKEY_HAZMAT_CRV_MAP [self .public_key .curve .name ],
133- x = self .public_key .public_numbers ().x .to_bytes (
134- settings .CRV_LEN_MAP [self .public_key .curve .name ], 'big'
135- )
133+ x = self .public_key .public_numbers ().x .to_bytes (settings .CRV_LEN_MAP [self .public_key .curve .name ], 'big' ),
134+ y = self .public_key .public_numbers ().y .to_bytes (settings .CRV_LEN_MAP [self .public_key .curve .name ], 'big' )
136135 )
137136 self .object .key = key
138137
You can’t perform that action at this time.
0 commit comments