|
|
|
@ -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();
|
|
|
|
|
}
|
|
|
|
|