1
0
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:
Pavol Rusnak 2017-12-13 18:04:22 +01:00
parent 106642bd44
commit 2c63d51580
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -458,10 +458,12 @@ static const HDNode *getDerivedNode(uint32_t *address_n, size_t address_n_count)
if (!address_n || address_n_count == 0) {
return &node;
}
if (hdnode_private_ckd_cached(&node, address_n, address_n_count, NULL) == 0) {
layoutHome();
debugLog(0, "", "ERR: Derive private failed");
return 0;
for (size_t i = 0; i < address_n_count; i++) {
if (hdnode_private_ckd(&node, address_n[i]) == 0) {
layoutHome();
debugLog(0, "", "ERR: Derive private failed");
return 0;
}
}
return &node;
}