1UI_UTIL_READ_PW(3)                  OpenSSL                 UI_UTIL_READ_PW(3)
2
3
4

NAME

6       UI_UTIL_read_pw_string, UI_UTIL_read_pw, UI_UTIL_wrap_read_pem_callback
7       - user interface utilities
8

SYNOPSIS

10        #include <openssl/ui.h>
11
12        int UI_UTIL_read_pw_string(char *buf, int length, const char *prompt,
13                                   int verify);
14        int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt,
15                            int verify);
16        UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag);
17

DESCRIPTION

19       UI_UTIL_read_pw_string() asks for a passphrase, using prompt as a
20       prompt, and stores it in buf.  The maximum allowed size is given with
21       length, including the terminating NUL byte.  If verify is non-zero, the
22       password will be verified as well.
23
24       UI_UTIL_read_pw() does the same as UI_UTIL_read_pw_string(), the
25       difference is that you can give it an external buffer buff for the
26       verification passphrase.
27
28       UI_UTIL_wrap_read_pem_callback() can be used to create a temporary
29       UI_METHOD that wraps a given PEM password callback cb.  rwflag is used
30       to specify if this method will be used for passphrase entry without (0)
31       or with (1) verification.  When not used any more, the returned method
32       should be freed with UI_destroy_method().
33

NOTES

35       UI_UTIL_read_pw_string() and UI_UTIL_read_pw() use default UI_METHOD.
36       See UI_get_default_method(3) and friends for more information.
37
38       The result from the UI_METHOD created by
39       UI_UTIL_wrap_read_pem_callback() will generate password strings in the
40       encoding that the given password callback generates.  The default
41       password prompting functions (apart from UI_UTIL_read_pw_string() and
42       UI_UTIL_read_pw(), there is PEM_def_callback(), EVP_read_pw_string()
43       and EVP_read_pw_string_min()) all use the default UI_METHOD.
44

RETURN VALUES

46       UI_UTIL_read_pw_string() and UI_UTIL_read_pw() return 0 on success or a
47       negative value on error.
48
49       UI_UTIL_wrap_read_pem_callback() returns a valid UI_METHOD structure or
50       NULL if an error occurred.
51

SEE ALSO

53       UI_get_default_method(3)
54
56       Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
57
58       Licensed under the OpenSSL license (the "License").  You may not use
59       this file except in compliance with the License.  You can obtain a copy
60       in the file LICENSE in the source distribution or at
61       <https://www.openssl.org/source/license.html>.
62
63
64
651.1.1d                            2019-10-03                UI_UTIL_READ_PW(3)
Impressum