File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 2
2
import cryptography
3
3
import logging
4
4
5
- from pycose .keys import CoseKey , EC2Key
5
+ from pycose .keys import EC2Key
6
6
from pycose .messages import Sign1Message
7
7
8
8
from pymdoccbor .exceptions import (
@@ -52,7 +52,7 @@ def __init__(self, data: cbor2.CBORTag) -> None:
52
52
f"MsoParser only supports raw bytes and list, a { type (data )} was provided"
53
53
)
54
54
55
- self .object .key : CoseKey | None = None
55
+ self .object .key = None
56
56
self .public_key : cryptography .hazmat .backends .openssl .ec ._EllipticCurvePublicKey = None
57
57
self .x509_certificates : list = []
58
58
@@ -130,9 +130,8 @@ def load_public_key(self) -> None:
130
130
131
131
key = EC2Key (
132
132
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' )
136
135
)
137
136
self .object .key = key
138
137
You can’t perform that action at this time.
0 commit comments