From ed76d030efbebd4de1b9d5f316e5a10d86ae860f Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 14 Dec 2015 22:53:14 +0100 Subject: [PATCH] check for sessionPassphraseCached --- firmware/storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/storage.c b/firmware/storage.c index d5f5bc9f9d..da046c50a5 100644 --- a/firmware/storage.c +++ b/firmware/storage.c @@ -265,7 +265,7 @@ bool storage_getRootNode(HDNode *node) if (hdnode_from_xprv(storage.node.depth, storage.node.fingerprint, storage.node.child_num, storage.node.chain_code.bytes, storage.node.private_key.bytes, &sessionRootNode) == 0) { return false; } - if (storage.has_passphrase_protection && storage.passphrase_protection && strlen(sessionPassphrase)) { + if (storage.has_passphrase_protection && storage.passphrase_protection && sessionPassphraseCached && strlen(sessionPassphrase) > 0) { // decrypt hd node uint8_t secret[64]; uint8_t salt[12];