OpenBSD manual page server

Manual Page Search Parameters

UI_UTIL_READ_PW(3) Library Functions Manual UI_UTIL_READ_PW(3)

UI_UTIL_read_pw, UI_UTIL_read_pw_stringget a password from the user

#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);

() 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.

() does the same as UI_UTIL_read_pw_string(), but takes an external buffer buff for the verification passphrase.

UI_UTIL_read_pw_string() and UI_UTIL_read_pw() return 0 on success or a negative value on error.

UI_new(3)

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 OpenBSD-7.0