File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 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):
188188
189189 sslib_signer = SSlibSigner (self .keystore ['snapshot' ])
190190 # 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 )
192192 # ... there are now two signatures, and
193193 self .assertEqual (len (metadata_obj .signatures ), 2 )
194194 # ... both are valid for the corresponding keys.
195195 targets_key .verify_signature (metadata_obj )
196196 snapshot_key .verify_signature (metadata_obj )
197+ # ... the returned (appended) signature is for snapshot key
198+ self .assertEqual (sig .keyid , snapshot_keyid )
197199
198200 sslib_signer = SSlibSigner (self .keystore ['timestamp' ])
199201 # 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(
228228 signer : Signer ,
229229 append : bool = False ,
230230 signed_serializer : Optional [SignedSerializer ] = None ,
231- ) -> Dict [ str , Any ] :
231+ ) -> Signature :
232232 """Creates signature over 'signed' and assigns it to 'signatures'.
233233
234234 Arguments:
@@ -247,7 +247,7 @@ def sign(
247247 Signing errors.
248248
249249 Returns:
250- A securesystemslib-style signature object.
250+ Securesystemslib Signature object that was added into signatures .
251251 """
252252
253253 if signed_serializer is None :
You can’t perform that action at this time.
0 commit comments