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
CONCERNING #8837
During the
generatehsmfunction, when you insert the passphrase, it appears as if the input is also saved as password, so thecheckhsmfunction 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 --daemon2 - Create HSM using
./tools/lightning-hsmtool generatehsm3a - 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_secret5a - 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
OKActual behavior
3 - The user is prompted only once and the input is saved for both password and passphrase
5a - Password is requested. Execution fails for every input different from the passphrase