mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +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,10 +458,12 @@ 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++) {
|
||||||
layoutHome();
|
if (hdnode_private_ckd(&node, address_n[i]) == 0) {
|
||||||
debugLog(0, "", "ERR: Derive private failed");
|
layoutHome();
|
||||||
return 0;
|
debugLog(0, "", "ERR: Derive private failed");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return &node;
|
return &node;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user