Skip to content

Commit

Permalink
ask for PIN in GetAddress and GetPublicKey messages
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak committed Mar 30, 2015
1 parent f5fb0c3 commit 7c6d2fe
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions firmware/fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,11 @@ void fsm_msgGetPublicKey(GetPublicKey *msg)
{
RESP_INIT(PublicKey);

if (!protectPin(true)) {
layoutHome();
return;
}

const HDNode *node = fsm_getDerivedNode(msg->address_n, msg->address_n_count);
if (!node) return;

Expand Down Expand Up @@ -500,6 +505,11 @@ void fsm_msgGetAddress(GetAddress *msg)
{
RESP_INIT(Address);

if (!protectPin(true)) {
layoutHome();
return;
}

const CoinType *coin = fsm_getCoin(msg->coin_name);
if (!coin) return;
const HDNode *node = fsm_getDerivedNode(msg->address_n, msg->address_n_count);
Expand Down

0 comments on commit 7c6d2fe

Please # to comment.