1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-15 12:08:59 +00:00

stellar: message is normalized before sign/verify

This commit is contained in:
Tomas Susanka 2018-05-14 15:33:57 +02:00
parent 22560128fe
commit bb74950e23

View File

@ -1216,9 +1216,11 @@ class ProtocolMixin(object):
@expect(proto.StellarMessageSignature)
def stellar_sign_message(self, address_n, message):
message = normalize_nfc(message)
return self.call(proto.StellarSignMessage(address_n=address_n, message=message))
def stellar_verify_message(self, pubkey_bytes, signature, message):
message = normalize_nfc(message)
resp = self.call(proto.StellarVerifyMessage(public_key=pubkey_bytes, message=message, signature=signature))
return isinstance(resp, proto.Success)