mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-30 01:01:00 +00:00
chore(python): remove outdated fix for MOCK_URANDOM problems
[no changelog]
This commit is contained in:
parent
10bbff11d1
commit
3edbb079a0
@ -133,9 +133,7 @@ class ProtocolV2(ProtocolAndChannel):
|
|||||||
self.sync_bit_send = 0
|
self.sync_bit_send = 0
|
||||||
self.sync_bit_receive = 0
|
self.sync_bit_receive = 0
|
||||||
# Send channel allocation request
|
# Send channel allocation request
|
||||||
# Note that [:8] on the following line is required when tests use
|
channel_id_request_nonce = os.urandom(8)
|
||||||
# WITH_MOCK_URANDOM. Without [:8] such tests will (almost always) fail.
|
|
||||||
channel_id_request_nonce = os.urandom(8)[:8]
|
|
||||||
thp_io.write_payload_to_wire_and_add_checksum(
|
thp_io.write_payload_to_wire_and_add_checksum(
|
||||||
self.transport,
|
self.transport,
|
||||||
MessageHeader.get_channel_allocation_request_header(12),
|
MessageHeader.get_channel_allocation_request_header(12),
|
||||||
@ -155,9 +153,7 @@ class ProtocolV2(ProtocolAndChannel):
|
|||||||
|
|
||||||
# Send handshake init request
|
# Send handshake init request
|
||||||
ha_init_req_header = MessageHeader(0, self.channel_id, 36)
|
ha_init_req_header = MessageHeader(0, self.channel_id, 36)
|
||||||
# Note that [:32] on the following line is required when tests use
|
host_ephemeral_privkey = curve25519.get_private_key(os.urandom(32))
|
||||||
# WITH_MOCK_URANDOM. Without [:32] such tests will (almost always) fail.
|
|
||||||
host_ephemeral_privkey = curve25519.get_private_key(os.urandom(32)[:32])
|
|
||||||
host_ephemeral_pubkey = curve25519.get_public_key(host_ephemeral_privkey)
|
host_ephemeral_pubkey = curve25519.get_public_key(host_ephemeral_privkey)
|
||||||
|
|
||||||
thp_io.write_payload_to_wire_and_add_checksum(
|
thp_io.write_payload_to_wire_and_add_checksum(
|
||||||
|
Loading…
Reference in New Issue
Block a user