mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 06:18:07 +00:00
legacy: return root_fingerprint in PublicKey
This commit is contained in:
parent
5e58835d18
commit
4d45a68fd0
@ -34,9 +34,16 @@ void fsm_msgGetPublicKey(const GetPublicKey *msg) {
|
||||
if (msg->has_ecdsa_curve_name) {
|
||||
curve = msg->ecdsa_curve_name;
|
||||
}
|
||||
|
||||
// derive m/0' to obtain root_fingerprint
|
||||
uint32_t root_fingerprint;
|
||||
uint32_t path[1] = {0x80000000 | 0};
|
||||
HDNode *node = fsm_getDerivedNode(curve, path, 1, &root_fingerprint);
|
||||
if (!node) return;
|
||||
|
||||
uint32_t fingerprint;
|
||||
HDNode *node = fsm_getDerivedNode(curve, msg->address_n, msg->address_n_count,
|
||||
&fingerprint);
|
||||
node = fsm_getDerivedNode(curve, msg->address_n, msg->address_n_count,
|
||||
&fingerprint);
|
||||
if (!node) return;
|
||||
hdnode_fill_public_key(node);
|
||||
|
||||
@ -96,6 +103,9 @@ void fsm_msgGetPublicKey(const GetPublicKey *msg) {
|
||||
}
|
||||
}
|
||||
|
||||
resp->has_root_fingerprint = true;
|
||||
resp->root_fingerprint = root_fingerprint;
|
||||
|
||||
msg_write(MessageType_MessageType_PublicKey, resp);
|
||||
layoutHome();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user