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. 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 THE ISSUE

1 - Run a lightning node using lightningd/lightningd --daemon

2 - Create HSM using ./tools/lightning-hsmtool generatehsm

3a - Don't set any password

3b - Insert any word when the passphrase is asked (no password should be set):

4 - Run ./tools/lightning-hsmtool checkhsm /tmp/current/hsm_secret

5a - Skip inputting password (if not set, it shouldn't be requested)

5b - Enter the passphrase

6 - Insert the correct passphrase and the corrects 12 words


Expected result

6 - Log shows OK


Actual behavior

3 - The user is prompted only once and the input is saved for both password and passphrase

Introduce your BIP39 word list separated by space (at least 12 words):
abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about
Warning: remember that different passphrases yield different bitcoin wallets.
If left empty, no password is used (echo is disabled).
Enter your passphrase: 

5a - Password is requested. Execution fails for every input different from the passphrase

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