mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-05 16:39:08 +00:00
print firmware fingerprint on upload
This commit is contained in:
parent
2d2e31fa50
commit
c31157fea1
@ -729,7 +729,11 @@ class ProtocolMixin(object):
|
|||||||
if isinstance(resp, proto.Failure) and resp.code == types.Failure_FirmwareError:
|
if isinstance(resp, proto.Failure) and resp.code == types.Failure_FirmwareError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
resp = self.call(proto.FirmwareUpload(payload=fp.read()))
|
data = fp.read()
|
||||||
|
fingerprint = hashlib.sha256(data[256:]).hexdigest()
|
||||||
|
log("Firmware fingerprint: " + fingerprint)
|
||||||
|
resp = self.call(proto.FirmwareUpload(payload=data))
|
||||||
|
|
||||||
if isinstance(resp, proto.Success):
|
if isinstance(resp, proto.Success):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user