Skip to content

lightning-hsmtool failed using checkhsm unless password is type as passphrase #9052

@MSimeZ

Description

@MSimeZ

CONCERNING #8837

During the generatehsm function, when you insert the passphrase, it appears as if the input is also saved as password, so the checkhsm function works right only if you insert the same input for both password and passphrase. This is in contrast with the expected behaviour of this function, since the password and the passphrase are both optional and should be allowed to be set independently from one another.


STEP TO REPRODUCE ISSUE

1 - Create HSM using ./tools/lightning-hsmtool generatehsm /tmp/hsm_test

2 - Don't set any password (press ENTER)

3 - Insert a word when the passphrase is asked (for example "qwerty")

4 - Run ./tools/lightning-hsmtool checkhsm /tmp/hsm_test

5 - When Enter hsm_secret password: is displayed, insert password (just press ENTER because of step 2)

Expected result

lightning-hsmtool asks for mnemonic passphrase:
Enter your mnemonic passphrase:

Actual behavior

lightning-hsmtool: Wrong passphrase: Undefined error: 0

In order to make checkhsm work:

a - Run ./tools/lightning-hsmtool checkhsm /tmp/hsm_test
b - When Enter hsm_secret password: is displayed, insert the passphrase set before (in this case "qwerty", step 3)
c - When Enter your mnemonic passphrase: is displayed, insert the passphrase set in step 3 ("qwerty")
d - When Introduce your BIP39 word list separated by space (at least 12 words): is displayed, insert mnemonic (it can be get by running cat /tmp/hsm_test)
e - OK is displayed

Metadata

Metadata

Assignees

No one assigned

    Labels

    QABlockstream QA team have reproduced, or a test has been created! Look for the linked PR/Issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions