Commit Graph

8 Commits

Author SHA1 Message Date
Antoine Poinsot d6f441bdf4 hsm_encryption: merge getline() logic between stdin and non-stdin
Avoid duplicating it, to minimize the potential for divergence.

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-06-18 10:40:07 +09:30
openoms fab1ed6fca hsm_encryption.c: fix source include order 2021-06-03 20:10:07 +02:00
openoms b821de13eb hsm_encryption.c: remove whitespace from line end 2021-06-03 20:10:07 +02:00
openoms b72c05fbda hsm_encryption: read from STDIN if not in a TTY
Changelog-Added: hsmtool: allow piped passwords
2021-06-03 20:10:07 +02:00
Antoine Poinsot d2a903992c hsmd: regroup hsm_secret decryption logic
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-01-06 13:50:01 +01:00
Antoine Poinsot c6bc22b0f5 hsmd: group hsm_secret encryption
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-01-06 13:50:01 +01:00
Antoine Poinsot a441485a35 lightningd: regroup hsm_secret password input logic
Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-01-06 13:50:01 +01:00
Antoine Poinsot 917f78a4f8 lightningd: group hsm_secret encryption key derivation
This avoids duplication of both logic and error-prone values, such as
the salt. Grouping all hsm encryption logic into a public API will also
allow us to fuzz it.

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
2021-01-06 13:50:01 +01:00