ecc: API changes: verify_message_hash to return bool instead of raising
verify_message_hash and verify_message_for_address now return bool instead of raising Exceptions on bad signatures.
This commit is contained in:
@@ -43,11 +43,7 @@ try:
|
||||
# verify a signature (65 bytes) over the session key, using the master bip32 node
|
||||
# - customized to use specific EC library of Electrum.
|
||||
pubkey = BIP32Node.from_xkey(expect_xpub).eckey
|
||||
try:
|
||||
pubkey.verify_message_hash(sig[1:65], self.session_key)
|
||||
return True
|
||||
except:
|
||||
return False
|
||||
return pubkey.verify_message_hash(sig[1:65], self.session_key)
|
||||
|
||||
except ImportError as e:
|
||||
if not (isinstance(e, ModuleNotFoundError) and e.name == 'ckcc'):
|
||||
|
||||
Reference in New Issue
Block a user