mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Raise InvalidSignature instead of KeyError if no signature present on transaction during verification
This commit is contained in:
parent
a7b3898b6f
commit
8e615b9ea6
@ -199,7 +199,9 @@ def verify_signature(signed_transaction):
|
||||
if 'assignee' in data:
|
||||
data.pop('assignee')
|
||||
|
||||
signature = data.pop('signature')
|
||||
signature = data.pop('signature', None)
|
||||
if not signature: return False
|
||||
|
||||
public_key_base58 = signed_transaction['transaction']['current_owner']
|
||||
public_key = PublicKey(public_key_base58)
|
||||
return public_key.verify(serialize(data), signature)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user