mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-08 13:42:41 +00:00
use new hdnode_private_ckd_cached API
This commit is contained in:
parent
ee3a7cbcfa
commit
1763a5b647
@ -138,7 +138,7 @@ HDNode *fsm_getDerivedNode(const char *curve, uint32_t *address_n, size_t addres
|
|||||||
if (!address_n || address_n_count == 0) {
|
if (!address_n || address_n_count == 0) {
|
||||||
return &node;
|
return &node;
|
||||||
}
|
}
|
||||||
if (hdnode_private_ckd_cached(&node, address_n, address_n_count) == 0) {
|
if (hdnode_private_ckd_cached(&node, address_n, address_n_count, NULL) == 0) {
|
||||||
fsm_sendFailure(FailureType_Failure_Other, "Failed to derive private key");
|
fsm_sendFailure(FailureType_Failure_Other, "Failed to derive private key");
|
||||||
layoutHome();
|
layoutHome();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -518,7 +518,7 @@ void signing_txack(TransactionType *tx)
|
|||||||
if (idx2 == idx1) {
|
if (idx2 == idx1) {
|
||||||
memcpy(&input, tx->inputs, sizeof(TxInputType));
|
memcpy(&input, tx->inputs, sizeof(TxInputType));
|
||||||
memcpy(&node, root, sizeof(HDNode));
|
memcpy(&node, root, sizeof(HDNode));
|
||||||
if (hdnode_private_ckd_cached(&node, tx->inputs[0].address_n, tx->inputs[0].address_n_count) == 0) {
|
if (hdnode_private_ckd_cached(&node, tx->inputs[0].address_n, tx->inputs[0].address_n_count, NULL) == 0) {
|
||||||
fsm_sendFailure(FailureType_Failure_Other, "Failed to derive private key");
|
fsm_sendFailure(FailureType_Failure_Other, "Failed to derive private key");
|
||||||
signing_abort();
|
signing_abort();
|
||||||
return;
|
return;
|
||||||
|
@ -68,7 +68,7 @@ int compile_output(const CoinType *coin, const HDNode *root, TxOutputType *in, T
|
|||||||
if (in->address_n_count > 0) {
|
if (in->address_n_count > 0) {
|
||||||
HDNode node;
|
HDNode node;
|
||||||
memcpy(&node, root, sizeof(HDNode));
|
memcpy(&node, root, sizeof(HDNode));
|
||||||
if (hdnode_private_ckd_cached(&node, in->address_n, in->address_n_count) == 0) {
|
if (hdnode_private_ckd_cached(&node, in->address_n, in->address_n_count, NULL) == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
layoutProgressUpdate(true);
|
layoutProgressUpdate(true);
|
||||||
|
@ -460,7 +460,7 @@ const HDNode *getDerivedNode(uint32_t *address_n, size_t address_n_count)
|
|||||||
if (!address_n || address_n_count == 0) {
|
if (!address_n || address_n_count == 0) {
|
||||||
return &node;
|
return &node;
|
||||||
}
|
}
|
||||||
if (hdnode_private_ckd_cached(&node, address_n, address_n_count) == 0) {
|
if (hdnode_private_ckd_cached(&node, address_n, address_n_count, NULL) == 0) {
|
||||||
layoutHome();
|
layoutHome();
|
||||||
debugLog(0, "", "ERR: Derive private failed");
|
debugLog(0, "", "ERR: Derive private failed");
|
||||||
return 0;
|
return 0;
|
||||||
|
2
vendor/trezor-crypto
vendored
2
vendor/trezor-crypto
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 6aac03d2d853eadaf9e91452b15381594fcf09b1
|
Subproject commit b55473a01ecfd095d1f4bd068c8d3385b993b986
|
Loading…
Reference in New Issue
Block a user