Commit Graph

1166 Commits

Author SHA1 Message Date
Roman Zeyde
9aca92b3d4 test(core): fix test_emu_sanity on T3W1 non-debug emulators
Currently `TrezorClientDebugLink` is trying to perform THP pairing,
which fails without DebugLink.

[no changelog]
2025-08-06 20:56:25 +03:00
Roman Zeyde
191631fba0 fix(core): skip unexpected THP packet during channel allocation
[no changelog]
2025-08-06 19:53:01 +03:00
M1nd3r
6809ade015 chore(python): add missing license headers
[no changelog]
2025-08-06 11:16:38 +02:00
M1nd3r
902db9a869 chore(python): remove year ranges from license headers
[no changelog]
2025-08-06 11:16:38 +02:00
M1nd3r
ed214e0939 chore(python): add AUTHORS to python-trezor
[no changelog]
2025-08-06 11:16:38 +02:00
M1nd3r
0566f5df64 chore(python): remove years range from relicense script
[no changelog]
2025-08-06 11:16:38 +02:00
Roman Zeyde
51f5b7707c fix(python): avoid failing emu.py if non-debug emulator is used
[no changelog]
2025-08-04 20:23:18 +03:00
M1nd3r
34fc169463 fix(python): fix failing session context for cli commands
[no changelog]
2025-08-04 12:19:50 +02:00
Roman Zeyde
9247b8028e fix(python): verify THP handshake init response before ACKing it
[no changelog]
2025-08-03 15:29:47 +03:00
Roman Zeyde
46b6b70387 fix(python): keep previous GC info
[no changelog]
2025-08-01 17:42:06 +03:00
Lukas Bielesch
381d951d89 fix(python): do not visit menu in an interactive test mode 2025-08-01 12:12:55 +02:00
Roman Zeyde
2158c98851 fix(python): don't send EndSession to bootloader
[no changelog]
2025-08-01 13:01:10 +03:00
Roman Zeyde
201e109873 test(core): check DebugLink._call() response to avoid dropping errors
Otherwise, some commands (e.g. `DebugLinkRecordScreen`)
could fail without raising `TrezorFailure`.

[no changelog]
2025-08-01 10:19:37 +03:00
Roman Zeyde
15eed484f5 test(core): avoid layout deadlock in test_autolock_does_not_interrupt_signing
[no changelog]
2025-08-01 10:19:37 +03:00
M1nd3r
3f0e1f19cc fix(python, test): allow deterministic ephemeral keys for some device tests 2025-07-31 20:29:05 +02:00
M1nd3r
3f36c0b969 chore(python): add timeout to ProtocolV2 2025-07-31 20:29:05 +02:00
Roman Zeyde
a73a9e2f6a fix(python): use same types when comparing versions
Previously, `client.version` was a tuple & `release[key_to_compare]` was a list, resulting in the following error:

```
$ trezorctl firmware update
Best available version: 2.9.0
Traceback (most recent call last):
  File "trezor-firmware/.venv/bin/trezorctl", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/.venv/lib/python3.12/site-packages/click/decorators.py", line 45, in new_func
    return f(get_current_context().obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/python/src/trezorlib/cli/firmware.py", line 693, in update
    url, fp = find_best_firmware_version(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "trezor-firmware/python/src/trezorlib/cli/firmware.py", line 372, in find_best_firmware_version
    if key_to_compare in release and release[key_to_compare] > client_version:
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'list' and 'tuple'
```

[no changelog]
2025-07-31 20:29:05 +02:00
M1nd3r
510658fe8f fix(python): improve robustness of protocol identification 2025-07-31 20:29:05 +02:00
M1nd3r
3a0edc8b4c chore(python): add ThpError exception 2025-07-31 20:29:05 +02:00
Roman Zeyde
de75ad55ba test(core): keep DebugLink.input_wait_type for BackgroundDeviceHandler
[no changelog]
2025-07-31 20:29:05 +02:00
M1nd3r
01a5cb68ba chore(docs): update python OPTIONS.rst docs 2025-07-31 20:29:05 +02:00
M1nd3r
672fb701a8 fix: error when making screenshots on t1 2025-07-31 20:29:05 +02:00
M1nd3r
78ecfb2caa test(python): adjust tests to session-based trezorlib
Co-authored-by: mmilata <85857+mmilata@users.noreply.github.com>
Co-authored-by: romanz <9900+romanz@users.noreply.github.com>
2025-07-31 20:29:05 +02:00
mmilata
de59e3bc98 feat(python): update python-tools to the session-based trezorlib
Co-authored-by: M1nd3r <63123927+M1nd3r@users.noreply.github.com>
2025-07-31 20:29:05 +02:00
M1nd3r
3f4459dd59 feat(python): change trezorctl to session-based 2025-07-31 20:29:05 +02:00
M1nd3r
4405c43877 feat(python): change trezorlib to session-based
Co-authored-by: mmilata <85857+mmilata@users.noreply.github.com>
2025-07-31 20:29:05 +02:00
M1nd3r
d454773692 chore(python): bump trezorlib version to 14.0 2025-07-31 20:29:05 +02:00
M1nd3r
f37109a20b chore: add changelog 2025-07-31 20:29:05 +02:00
M1nd3r
e3f8a00e97 chore: add noiseprotocol package 2025-07-31 20:29:05 +02:00
tychovrahe
2bd3b6ff06 fix(core): fix bootloader monotonic check during upgrade
[no changelog]
2025-07-29 11:37:47 +02:00
cepetr
681b0d389e feat(core): introduce fail-safe/pq signed boardloader
[no changelog]
2025-07-29 11:37:47 +02:00
Martin Milata
f2173d5276 tests(python): add tests against python 3.12
[no changelog]
2025-07-24 14:43:05 +02:00
tychovrahe
3b9be7baec feat(core): add allow unlimited run vendorheader flag
[no changelog]
2025-07-22 14:04:09 +02:00
tychovrahe
4cd28ef643 fix(core): improve manufacturing mode detection by respecting vendorheader flag
[no changelog]
2025-07-22 14:04:09 +02:00
tychovrahe
8795cbcf5c feat(core): verify secmon signature in bootloader
[no changelog]
2025-07-22 14:04:09 +02:00
tychovrahe
fcf2bd0d48 feat(core): add secmon header
[no changelog]
2025-07-22 14:04:09 +02:00
M1nd3r
0b2fdf3667 chore(common/core): use public_key instead of pubkey in THP messages
[no changelog]
2025-07-21 13:05:51 +02:00
M1nd3r
3efcd0b601 chore(common): add ButtonAck to ThpMessageType
[no changelog]
2025-07-21 12:52:33 +02:00
Roman Zeyde
b0cc29cbae test(core): visit Delizia menu items in UI tests
[no changelog]
2025-07-21 10:10:17 +03:00
Michael de Hoog
304b0150e6 test(core): EIP-712 message hash
- add show_message_hash to client
2025-07-19 15:00:37 +02:00
Michael de Hoog
70ccc36ae4 feat(core): support displaying EIP-712 message hash during signing 2025-07-19 15:00:37 +02:00
Lukas Bielesch
6cc9c62941 chore(core): new entry in DebugLinkDecision message
- new optional enum TouchEventType in DebugLinkDecision message
- add new hold_touch debuglink function
- new pin tests utilizing hold_touch function
2025-07-16 13:40:04 +02:00
M1nd3r
286fb47541 chore: reoder THP messages
[no changelog]
2025-07-14 21:05:27 +02:00
Ioan Bizău
8bfc5ff6d5 feat(tests): look for menus recursively
[no changelog]
2025-07-11 10:07:19 +02:00
Roman Zeyde
953b0e23d1 test(core): visit Delizia menu during tests
Currently, only shows the menu (without visiting its children).
Enabled by returning `has_menu=True` via LayoutContent JSON.

Also, reduce the number of `debuglink.read_layout()` calls in tests.

[no changelog]
2025-07-10 12:12:06 +03:00
Ioan Bizău
327ccd38e4 Revert "feat: Make payment request protobuf fields optional."
This reverts commit 4a4cc34d65ee5ec7b1cfc1617b2d20f15122ddf6.
2025-07-10 10:10:14 +02:00
Andrew Kozlik
8ffeb6e387 feat(common): Add PaymentNotification protobuf message. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
8103bd1aa2 feat(core): Implement payment requests in Ripple signing. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
70ef22b865 feat(common): Add PaymentRequest field to Ripple signing. 2025-07-10 10:10:14 +02:00
Andrew Kozlik
96afce1e0c feat(core): Set mac field in altcoin Address response messages. 2025-07-10 10:10:14 +02:00