Sortix 1.1dev nightly manual
This manual documents Sortix 1.1dev nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
UI_UTIL_READ_PW(3) | Library Functions Manual | UI_UTIL_READ_PW(3) |
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
UI_new(3)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.March 22, 2018 | Debian |