Skip to content

Commit ee39866

Browse files
Fix unit test failureintroduced by backwards-incompatible change introduced by cryptography 1.9
1 parent 16356ec commit ee39866

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

securesystemslib/ecdsa_keys.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,11 @@ def verify_signature(public_key, method, signature, data):
290290
raise securesystemslib.exceptions.FormatError('Invalid signature or'
291291
' data: ' + str(e))
292292

293-
# verify() returns either True or raises an 'InvalidSignature' exception.
293+
# verify() raises an 'InvalidSignature' exception if 'signature'
294+
# is invalid.
294295
try:
295-
return verifier.verify()
296+
verifier.verify()
297+
return True
296298

297299
except cryptography.exceptions.InvalidSignature:
298300
return False

0 commit comments

Comments
 (0)