Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions tests/test_msg_resetdevice.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,11 @@ def test_reset_device_pin(self):
language='english',
label='test'))

self.assertIsInstance(ret, proto.ButtonRequest)
self.client.debug.press_yes()
ret = self.client.call_raw(proto.ButtonAck())

# display_random=True above is deliberate: the field stays in the wire
# schema for host compatibility but production firmware ignores it,
# because internal entropy is seed pre-image material. A host that
# sets it must get a NORMAL reset -- no Internal Entropy screen -- so
# the very next message is the PIN request, not a ButtonRequest.
self.assertIsInstance(ret, proto.PinMatrixRequest)

# Enter PIN for first time
Expand Down Expand Up @@ -318,10 +319,11 @@ def test_failed_pin(self):
language='english',
label='test'))

self.assertIsInstance(ret, proto.ButtonRequest)
self.client.debug.press_yes()
ret = self.client.call_raw(proto.ButtonAck())

# display_random=True above is deliberate: the field stays in the wire
# schema for host compatibility but production firmware ignores it,
# because internal entropy is seed pre-image material. A host that
# sets it must get a NORMAL reset -- no Internal Entropy screen -- so
# the very next message is the PIN request, not a ButtonRequest.
self.assertIsInstance(ret, proto.PinMatrixRequest)

# Enter PIN for first time
Expand Down
Loading