MCPcopy Create free account
hub / github.com/ElementsProject/lightning / get_hsm_secret

Function get_hsm_secret

tools/hsmtool.c:70–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70static void get_hsm_secret(struct secret *hsm_secret,
71 const char *hsm_secret_path)
72{
73 int fd;
74
75 fd = open(hsm_secret_path, O_RDONLY);
76 if (fd < 0)
77 errx(EXITCODE_ERROR_HSM_FILE, "Could not open hsm_secret");
78 if (!read_all(fd, hsm_secret, sizeof(*hsm_secret)))
79 errx(EXITCODE_ERROR_HSM_FILE, "Could not read hsm_secret");
80 close(fd);
81}
82
83/* Derive the encryption key from the password provided, and try to decrypt
84 * the cipher. */

Callers 5

encrypt_hsmFunction · 0.85
dump_commitments_infosFunction · 0.85
guess_to_remoteFunction · 0.85
dumponchaindescriptorsFunction · 0.85
check_hsmFunction · 0.85

Calls 2

errxFunction · 0.85
read_allFunction · 0.85

Tested by

no test coverage detected