File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -188,12 +188,14 @@ def test_sign_verify(self):
188
188
189
189
sslib_signer = SSlibSigner (self .keystore ['snapshot' ])
190
190
# Append a new signature with the unrelated key and assert that ...
191
- metadata_obj .sign (sslib_signer , append = True )
191
+ sig = metadata_obj .sign (sslib_signer , append = True )
192
192
# ... there are now two signatures, and
193
193
self .assertEqual (len (metadata_obj .signatures ), 2 )
194
194
# ... both are valid for the corresponding keys.
195
195
targets_key .verify_signature (metadata_obj )
196
196
snapshot_key .verify_signature (metadata_obj )
197
+ # ... the returned (appended) signature is for snapshot key
198
+ self .assertEqual (sig .keyid , snapshot_keyid )
197
199
198
200
sslib_signer = SSlibSigner (self .keystore ['timestamp' ])
199
201
# Create and assign (don't append) a new signature and assert that ...
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ def sign(
228
228
signer : Signer ,
229
229
append : bool = False ,
230
230
signed_serializer : Optional [SignedSerializer ] = None ,
231
- ) -> Dict [ str , Any ] :
231
+ ) -> Signature :
232
232
"""Creates signature over 'signed' and assigns it to 'signatures'.
233
233
234
234
Arguments:
@@ -247,7 +247,7 @@ def sign(
247
247
Signing errors.
248
248
249
249
Returns:
250
- A securesystemslib-style signature object.
250
+ Securesystemslib Signature object that was added into signatures .
251
251
"""
252
252
253
253
if signed_serializer is None :
You can’t perform that action at this time.
0 commit comments