mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 17:38:39 +00:00
u2f: avoid using hdnode_private_ckd_cached in order not to constantly invalidate cache
This commit is contained in:
parent
106642bd44
commit
2c63d51580
@ -458,11 +458,13 @@ static 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, NULL) == 0) {
|
for (size_t i = 0; i < address_n_count; i++) {
|
||||||
|
if (hdnode_private_ckd(&node, address_n[i]) == 0) {
|
||||||
layoutHome();
|
layoutHome();
|
||||||
debugLog(0, "", "ERR: Derive private failed");
|
debugLog(0, "", "ERR: Derive private failed");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return &node;
|
return &node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user