diff --git a/tests/test_msg_resetdevice.py b/tests/test_msg_resetdevice.py index 28c5475f..e1d3c4cd 100644 --- a/tests/test_msg_resetdevice.py +++ b/tests/test_msg_resetdevice.py @@ -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 @@ -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