1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-09 06:50:58 +00:00

tests/eth: add invalid signature test for verify

This commit is contained in:
Tomas Susanka 2018-11-26 16:30:29 +01:00
parent ab461548ce
commit 0d01298f71

View File

@ -43,3 +43,9 @@ class TestMsgEthereumVerifymessage(TrezorTest):
self.client, bytes.fromhex(self.ADDRESS), bytes.fromhex(sig), msg
)
assert res is True
def test_verify_invalid(self):
self.setup_mnemonic_nopin_nopassphrase()
signature = bytes.fromhex(self.VECTORS[0][1])
res = ethereum.verify_message(self.client, bytes.fromhex(self.ADDRESS), signature, "another message")
assert res == False