Sortix
Sortix Download Manual Development News Blog More
current nightly

Sortix nightly manual

This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.

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.
Copyright 2011-2023 Jonas 'Sortie' Termansen and contributors.
Sortix is free software under the ISC license.
#sortix on irc.sortix.org
@sortix_org