DES_READ_PW(3)

NAME
des_read_pw, des_read_pw_string, EVP_read_pw_string - compatibility user interface functions

SYNOPSIS
#include <openssl/ui_compat.h>
int
des_read_pw(char *buf, char *buff, int length, const char *prompt, int verify);
int
des_read_pw_string(char *buf, int length, const char *prompt, int verify);
#include <openssl/evp.h>
int
EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);

DESCRIPTION
The DES library contained a few routines to prompt for passwords. These aren't necessarily dependent on DES, and have therefore become part of the UI compatibility library.

des_read_pw() writes the string specified by prompt to standard output, turns echo off, and reads an input string from the terminal. The string is returned in buf, which must have space for at least length bytes. If verify is set, the user is asked for the password twice and unless the two copies match, an error is returned. The second password is stored in buff, which must therefore also be at least length bytes. A return code of -1 indicates a system error, 1 failure due to use interaction, and 0 is success.

des_read_pw_string() is a variant of des_read_pw() that provides a buffer if verify is set. It is available in the MIT Kerberos library as well. If length exceeds BUFSIZ, des_read_pw_string() uses BUFSIZ.

EVP_read_pw_string() is functionally similar to des_read_pw_string().

SEE ALSO
UI_new(3)

AUTHORS
Richard Levitte <richard@levitte.org> for the OpenSSL project.