NAME
UI_UTIL_read_pw
,
UI_UTIL_read_pw_string
—
get a password from the user
SYNOPSIS
#include
<openssl/ui.h>
int
UI_UTIL_read_pw_string
(char
*buf, int length, const char
*prompt, int verify);
int
UI_UTIL_read_pw
(char *buf,
char *buff, int size,
const char *prompt, int
verify);
DESCRIPTION
UI_UTIL_read_pw_string
()
asks for a passphrase, using prompt as a prompt, and
stores it in buf. The maximum allowed size is given
with length, including the terminating NUL byte. If
verify is non-zero, the password will be verified as
well.
UI_UTIL_read_pw
()
does the same as UI_UTIL_read_pw_string
(), but takes
an external buffer buff for the verification
passphrase.
RETURN VALUES
UI_UTIL_read_pw_string
() and
UI_UTIL_read_pw
() return 0 on success or a negative
value on error.
SEE ALSO
HISTORY
UI_UTIL_read_pw
() and
UI_UTIL_read_pw_string
() first appeared in OpenSSL
0.9.7 and have been available since OpenBSD 3.2.