Skip to content

lightning-hsmtool: Fix getsecret does not show mnemonic after typing password#8951

Draft
ekzyis wants to merge 1 commit intoElementsProject:masterfrom
ekzyis:fix-8944-lightning-hsm-getsecret
Draft

lightning-hsmtool: Fix getsecret does not show mnemonic after typing password#8951
ekzyis wants to merge 1 commit intoElementsProject:masterfrom
ekzyis:fix-8944-lightning-hsm-getsecret

Conversation

@ekzyis
Copy link

@ekzyis ekzyis commented Mar 19, 2026

Important

26.04 FREEZE March 11th: Non-bugfix PRs not ready by this date will wait for 26.06.

RC1 is scheduled on March 23rd

The final release is scheduled for April 15th.

fixes #8944

I looked at the code for extract_hsm_secret and saw that HSM_SECRET_MNEMONIC_WITH_PASS is handled in the same way as HSM_SECRET_MNEMONIC_NO_PASS, so I assumed that should also be the case when printing the secret. This indeed fixed the issue.

case HSM_SECRET_MNEMONIC_NO_PASS:
case HSM_SECRET_MNEMONIC_WITH_PASS:
return extract_mnemonic_secret(ctx, hsm_secret, len, passphrase, type, err);

However, I'm new to contributing to Core Lightning, and didn't look at anything else. Maybe I missed some implications of this change.

TODO

  • Check if this requires a changelog entry (does this only alter things made in the same release?)
  • add regression test

Checklist

Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:

  • The changelog has been updated in the relevant commit(s) according to the guidelines.
  • Tests have been added or modified to reflect the changes.
  • Documentation has been reviewed and updated as needed.
  • Related issues have been listed and linked, including any that this PR closes.
  • Important All PRs must consider how to reverse any persistent changes for tools/lightning-downgrade

@ekzyis ekzyis force-pushed the fix-8944-lightning-hsm-getsecret branch from e03fca4 to 74188dd Compare March 19, 2026 03:07
@ekzyis ekzyis changed the title Fix lightning-hsm getsecret for mnemonics with passphrase lightning-hsmtool: Fix getsecret does not show mnemonic after typing password Mar 19, 2026
@ekzyis ekzyis marked this pull request as draft March 19, 2026 03:17
…password

Changelog-Fixed: `lightning-hsmtool`: `getsecret` does not show mnemonic after typing password
@ekzyis ekzyis force-pushed the fix-8944-lightning-hsm-getsecret branch from 74188dd to ce86c39 Compare March 19, 2026 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lightning-hsmtool does not show mnemonic after typing password

1 participant