1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-12 17:38:13 +00:00
This commit is contained in:
M1nd3r 2024-12-04 17:50:21 +01:00
parent 41cdbf7bc4
commit 93253c9b60
3 changed files with 3 additions and 1 deletions

View File

@ -242,6 +242,7 @@ if utils.USE_THP:
new_session = create_new_session(channel)
try:
await unlock_device()
await derive_and_store_roots(new_session, message)
except DataError as e:
return Failure(code=FailureType.DataError, message=e.message)

View File

@ -145,7 +145,7 @@ def _try_allocate_new_buffer(payload_length: int) -> utils.BufferType:
try:
payload: utils.BufferType = bytearray(payload_length)
except MemoryError:
payload = bytearray(PACKET_LENGTH)
payload = bytearray(PACKET_LENGTH) # TODO ???
raise ThpError("Message too large")
return payload

View File

@ -265,6 +265,7 @@ def with_session(
if management:
session = obj.get_management_session()
else:
# TODO try (sys.exit ve finally)
session = obj.get_session(
derive_cardano=derive_cardano,
empty_passphrase=empty_passphrase,