1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-19 05:58:09 +00:00
Commit Graph

860 Commits

Author SHA1 Message Date
matejcik
3390422ce3 device: pass u2f counter when running device recovery 2019-01-23 11:34:59 +01:00
matejcik
7d14018f99 tools: make sure that passed Base58 string uses valid alphabet 2019-01-23 11:34:41 +01:00
Tomas Susanka
d09f4470d2 tests/stellar: use bytes.fromhex instead of binascii.unhexlify 2019-01-17 14:31:07 +01:00
Tomas Susanka
6c659715dc tests: style 2019-01-17 14:26:15 +01:00
Tomas Susanka
e732ee6a75 tests/stellar: add more tests for SetOptionsOp 2019-01-17 14:18:02 +01:00
matejcik
921d881cdf Revert "device_tests: xfail EthereumGetPublicKey on TT (feature is postponed)"
This reverts commit 953e0d1d8c.
2019-01-15 14:50:03 +01:00
matejcik
953e0d1d8c device_tests: xfail EthereumGetPublicKey on TT (feature is postponed) 2019-01-15 14:03:32 +01:00
Tomas Susanka
7288700b86 eth: add get public key 2019-01-15 12:46:20 +01:00
Tomas Susanka
701b603419 tests: uncomment ripple test
Some ripple tests stayed commented out accidentally. Shame on me.
2019-01-09 15:00:44 +01:00
Alexander Block
d131b70bed Dash: Support spending DIP2 special transaction inputs (#351)
This implements support for spending of TX outputs which are part of a [DIP2](https://github.com/dashpay/dips/blob/master/dip-0002.md) special transaction, especially [DIP4 coinbases](https://github.com/dashpay/dips/blob/master/dip-0004.md#coinbase-special-transaction).

This is for Dash only and thus required the addition of `is_dash` in `tx_api.py`.

Support on the firmware side is not required for this to work as it reuses the logic from Zcash's `extra_data` and `extra_data_len` fields.
2019-01-09 14:43:30 +01:00
matejcik
6fa8ccfeed transport: report proper exception when no device found 2019-01-09 13:51:37 +01:00
Tomas Susanka
897bc14a36 tests: add ripple test case with destination tag 2019-01-08 16:38:45 +01:00
strmci
402e72e36e device_tests: add input flow function to Ontology tests (#348) 2019-01-07 12:58:42 +01:00
Jochen Hoenicke
0428f5091c Don't require prevtx for coins with BIP-143 fork id (#352)
Coins like Bitcoin Cash and Bitcoin Gold always use BIP-143 signatures
that do not require previous transactions.
2019-01-07 12:57:12 +01:00
matejcik
369b704f6b trezorlib: bump to 0.11.1 2018-12-28 13:00:35 +01:00
ghost43
8c644cc03e qt: don't import PyQt5.Qt 2018-12-28 12:48:31 +01:00
matejcik
cf9106ff5d client: only normalize passphrase if not entered on device 2018-12-17 14:01:52 +01:00
Pavol Rusnak
831fde9c5c
tests: T1 now caches the PIN after PIN set/change 2018-12-14 15:17:41 +01:00
Jan Pochyla
0390c1da0a tests: use valid paths in various altcoin tests 2018-12-13 15:49:31 +01:00
matejcik
bfb6a196c0 tests: limit number of reported expected responses
so that our test logs are not spammed, esp. in that one test that has
20k messages
2018-12-13 14:10:44 +01:00
strmci
b0a227866a device_tests: add input flow function to NEM signing test 2018-12-06 17:41:24 +01:00
matejcik
d4bcabc224 trezorlib: set minimum firmware for TT to 2.0.10
even though it's not required now, it will be in ~2 weeks
2018-12-06 16:10:56 +01:00
matejcik
1179bd407b client: fix bug with old firmware that doesn't send the "model" field 2018-12-06 15:07:50 +01:00
matejcik
23feb24573 ui: allow empty passphrase in ClickUI 2018-12-06 15:05:41 +01:00
matejcik
4ab8bec901 transport/webusb: change type annotations to strings
otherwise it fails when usb1 is missing, because python's type
annotation system
2018-12-05 16:52:04 +01:00
matejcik
ea16d3c42a client: fix short-circuited ping
(it's using call_raw so it must open its own session)
2018-12-05 16:51:33 +01:00
matejcik
e89e6ca32e build: add script for fetching required release versions 2018-12-04 17:59:30 +01:00
matejcik
d9e5fd2682 client: refuse to work with outdated firmware
required firmware versions are hardcoded and should be updated by a
build script
2018-12-04 17:42:54 +01:00
matejcik
84339ae1ff client: properly sanitize and handle invalid inputs from UI functions 2018-12-04 17:42:54 +01:00
matejcik
3362f66724 client: make sure proto exists in client
because old Electrum imports it

also make sure it doesn't work anymore
2018-12-04 17:42:54 +01:00
matejcik
db1a5adee7 device_tests: style 2018-11-26 17:02:00 +01:00
Tomas Susanka
0d01298f71 tests/eth: add invalid signature test for verify 2018-11-26 16:30:34 +01:00
matejcik
4982fd1cf5 client: wrap clear_session in a session
because it's a different kind of session...
2018-11-26 16:06:56 +01:00
matejcik
c7c5653231 trezorlib: bump version (not releasing yet though) 2018-11-26 16:02:19 +01:00
matejcik
1ded85c746 tests/unit_tests: update test_transport 2018-11-26 15:58:19 +01:00
matejcik
36a81fd9e7 trezorlib: update CallException to match the old one
which is now TrezorFailure
2018-11-26 15:30:42 +01:00
matejcik
1f2db3666b ui: smarter ClickUI prompts only once
This also fixes #331 by moving the PIN matrix from trezorctl into the UI
class
2018-11-26 15:30:42 +01:00
matejcik
eb50d54ec2 device: add reasonable defaults for reset/recovery 2018-11-26 15:30:42 +01:00
matejcik
40eaa1fa36 transport/hid: reload serial when closing
because device.wipe() causes the device to change serial, which breaks
the connection unnecessarily.
2018-11-26 15:30:42 +01:00
matejcik
f3a13f50e0 transport/hid: check serial number when opening device
This fixes the problem where the user disconnects a device, connects a
different one, and the library doesn't notice because opening the same
HID path worked fine. (see https://github.com/spesmilo/electrum/issues/4806 )
2018-11-26 15:30:42 +01:00
matejcik
082adfd15d transport: derive TransportException from TrezorException 2018-11-26 15:30:42 +01:00
matejcik
69ef1f0acd transport: cleaner Transport list instantiation
Previously if an import of a dependent module (usb1, hid) failed, import
of the whole transport module would fail. This was resolved by catching
ImportErrors in the all_transports method.

This had two drawbacks:
- if something other than ImportError happened - e.g., libusb would
raise OSError if it couldn't find libusb.so - all_transports would crash
anyway
- at the same time, if a legitimately needed dependency
(typing_extensions) was missing, this would be masked by the ImportError
handling.

Instead, we unconditionally import the modules, and inside each one,
wrap dependencies in a try-except.

As an added benefit, it is now possible to disable a transport just by
setting SomeTransport.ENABLED = False
2018-11-26 15:30:42 +01:00
matejcik
f04458d6ea client: allow canceling pin/passphrase entry 2018-11-26 15:30:42 +01:00
matejcik
11e56a7e1b client: clean up constants 2018-11-26 15:30:42 +01:00
matejcik
3dda5e6534 client: proto -> messages 2018-11-26 15:30:42 +01:00
matejcik
4f9bdff564 client: simplify MovedTo now that we only need it to raise an error
this also removes most of client's imports, which will FINALLY let us
import client where it is needed without circular dependencies
2018-11-26 15:30:42 +01:00
matejcik
ef46bd38ef client: finish the move away from mixins
move all methods that are still relevant to TrezorClient (originally
BaseClient)

modify ProtocolMixin to be a compatibility shim

modify BaseClient to be a compatibility shim with a proxy to original
actual TrezorClient - this prevents early failures in Electrum for long
enough to show an error message
2018-11-26 15:30:42 +01:00
matejcik
f3f521b028 client: convert generic classname-based dispatch to a static list
Only a limited number of messages should be dispatched to handlers
that can be inserted anywhere in the protocol flow. Having a fixed list
of interjecting handlers makes this clearer and prevents hard-to-find
bugs.
2018-11-26 15:30:42 +01:00
Tomas Susanka
786bccfa34 tests/lisk: all all all seed 2018-11-21 17:08:18 +01:00
Tomas Susanka
29d3a21d84 tests/eth: all all all seed 2018-11-21 17:08:18 +01:00