1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 23:08:14 +00:00

core/keychain: differentiate error message for ed25519 derivation

This commit is contained in:
matejcik 2020-07-24 11:25:26 +02:00 committed by matejcik
parent 0438f83a94
commit fd8cb0e061
3 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ class Keychain:
def verify_path(self, path: paths.Bip32Path) -> None:
if "ed25519" in self.curve and not paths.path_is_hardened(path):
raise FORBIDDEN_KEY_PATH
raise wire.DataError("Non-hardened paths unsupported on Ed25519")
if device.unsafe_prompts_allowed():
return

View File

@ -44,6 +44,7 @@ class TestMsgStellarGetAddress:
)
assert address == "GBAW5XGWORWVFE2XTJYDTLDHXTY2Q2MO73HYCGB3XMFMQ562Q2W2GJQX"
@pytest.mark.skip_ui
def test_stellar_get_address_fail(self, client):
with pytest.raises(TrezorFailure) as exc:
stellar.get_address(client, parse_path("m/0/1"))
@ -53,4 +54,4 @@ class TestMsgStellarGetAddress:
assert exc.value.message.endswith("Failed to derive private key")
else:
assert exc.value.code == proto.FailureType.DataError
assert exc.value.message.endswith("Forbidden key path")
assert exc.value.message == "Non-hardened paths unsupported on Ed25519"

View File

@ -309,7 +309,6 @@
"test_msg_signtx_zcash.py-test_one_one_fee_sapling": "112df2ad84f4a517623eed893b3be809e0ba43e6139fd70b7f94c12f28cc633c",
"test_msg_signtx_zcash.py-test_spend_old_versions": "da64743acaead691ec617cd56886b65453f82a2e3eb78b3f9dc737dbfc4155e6",
"test_msg_stellar_get_address.py-test_stellar_get_address": "5a80508a71a9ef64f94762b07636f90e464832f0f4a3102af8fa1a8c69e94586",
"test_msg_stellar_get_address.py-test_stellar_get_address_fail": "5a80508a71a9ef64f94762b07636f90e464832f0f4a3102af8fa1a8c69e94586",
"test_msg_stellar_get_address.py-test_stellar_get_address_sep": "46a370f6ff6cc90860e2b13eaab201986059227fbf5c841d9c55a21078155aba",
"test_msg_stellar_sign_transaction.py::test_manage_data": "3dcb182ce27f4d26429570a3ee09d465d477a68a072687866ea291cf91bf805d",
"test_msg_stellar_sign_transaction.py::test_sign_tx_account_merge_op": "36553c2e11b972a1ee7f29c4c218a8cd20883f5a873151ecac7ac332c461d0af",