File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,6 +160,10 @@ const char *hsm_secret_error_str(enum hsm_secret_error err)
160160 return "Could not derive seed from mnemonic" ;
161161 case HSM_SECRET_ERR_INVALID_FORMAT :
162162 return "Invalid hsm_secret format" ;
163+ case HSM_SECRET_ERR_TERMINAL :
164+ return "Terminal error" ;
165+ case HSM_SECRET_ERR_MEMORY :
166+ return "Memory error" ;
163167 }
164168 return "Unknown error" ;
165169}
Original file line number Diff line number Diff line change @@ -100,10 +100,12 @@ int is_legacy_hsm_secret_encrypted(const char *path);
100100/**
101101 * Reads a passphrase from stdin, disabling terminal echo.
102102 * Returns a newly allocated string on success, NULL on error.
103- * @reason - on failure, this will be set to the reason.
104- * @exit_code - on failure, this will be set to the recommended exit code.
103+ * @ctx - tal context for allocation
104+ * @err - on failure, this will be set to the error code
105+ *
106+ * Returns allocated passphrase or NULL on error.
105107 */
106- char * read_stdin_pass_with_exit_code (const char * * reason , int * exit_code );
108+ const char * read_stdin_pass (const tal_t * ctx , enum hsm_secret_error * err );
107109
108110/**
109111 * Derive encryption key from passphrase using Argon2id.
You can’t perform that action at this time.
0 commit comments