1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 12:00:59 +00:00
This commit is contained in:
M1nd3r 2024-12-04 17:50:21 +01:00
parent e071f2f4ac
commit 33957ce1c8
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) new_session = create_new_session(channel)
try: try:
await unlock_device()
await derive_and_store_roots(new_session, message) await derive_and_store_roots(new_session, message)
except DataError as e: except DataError as e:
return Failure(code=FailureType.DataError, message=e.message) 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: try:
payload: utils.BufferType = bytearray(payload_length) payload: utils.BufferType = bytearray(payload_length)
except MemoryError: except MemoryError:
payload = bytearray(PACKET_LENGTH) payload = bytearray(PACKET_LENGTH) # TODO ???
raise ThpError("Message too large") raise ThpError("Message too large")
return payload return payload

View File

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