File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -90,20 +90,14 @@ def sign(
9090
9191 msg .key = cose_key # attach the key to the message
9292
93- if isinstance (signing_key , ExtendedSigningKey ):
94- _message = [
95- msg .phdr_encoded ,
96- msg .uhdr_encoded ,
97- msg .payload ,
98- signing_key .sign (msg ._sig_structure ),
99- ]
100-
101- encoded = dumps (
102- CBORTag (msg .cbor_tag , _message ), default = msg ._custom_cbor_encoder
103- )
104-
105- else :
106- encoded = msg .encode ()
93+ _message = [
94+ msg .phdr_encoded ,
95+ msg .uhdr_encoded ,
96+ msg .payload ,
97+ signing_key .sign (msg ._sig_structure ),
98+ ]
99+
100+ encoded = dumps (CBORTag (msg .cbor_tag , _message ), default = msg ._custom_cbor_encoder )
107101
108102 # turn the enocded message into a hex string and remove the first byte
109103 # which is always "d2"
You can’t perform that action at this time.
0 commit comments