]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/UI_UTIL_read_pw.pod
Following the license change, modify the boilerplates in doc/man3/
[thirdparty/openssl.git] / doc / man3 / UI_UTIL_read_pw.pod
CommitLineData
cc10f227
RL
1=pod
2
3=head1 NAME
4
5UI_UTIL_read_pw_string, UI_UTIL_read_pw,
23103a52 6UI_UTIL_wrap_read_pem_callback - user interface utilities
cc10f227
RL
7
8=head1 SYNOPSIS
9
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);
23103a52 16 UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag);
cc10f227
RL
17
18=head1 DESCRIPTION
19
20UI_UTIL_read_pw_string() asks for a passphrase, using B<prompt> as a
21prompt, and stores it in B<buf>.
22The maximum allowed size is given with B<length>, including the
23terminating NUL byte.
24If B<verify> is non-zero, the password will be verified as well.
25
26UI_UTIL_read_pw() does the same as UI_UTIL_read_pw_string(), the
27difference is that you can give it an external buffer B<buff> for the
28verification passphrase.
29
30UI_UTIL_wrap_read_pem_callback() can be used to create a temporary
31B<UI_METHOD> that wraps a given PEM password callback B<cb>.
32B<rwflag> is used to specify if this method will be used for
33passphrase entry without (0) or with (1) verification.
34When not used any more, the returned method should be freed with
35UI_destroy_method().
36
789d6ddd
RL
37=head1 NOTES
38
39UI_UTIL_read_pw_string() and UI_UTIL_read_pw() use default
40B<UI_METHOD>.
41See L<UI_get_default_method(3)> and friends for more information.
42
43The result from the B<UI_METHOD> created by
44UI_UTIL_wrap_read_pem_callback() will generate password strings in the
45encoding that the given password callback generates.
46The default password prompting functions (apart from
47UI_UTIL_read_pw_string() and UI_UTIL_read_pw(), there is
48PEM_def_callback(), EVP_read_pw_string() and EVP_read_pw_string_min())
49all use the default B<UI_METHOD>.
50
1f13ad31
PY
51=head1 RETURN VALUES
52
53UI_UTIL_read_pw_string() and UI_UTIL_read_pw() return 0 on success or a negative
54value on error.
55
56UI_UTIL_wrap_read_pem_callback() returns a valid B<UI_METHOD> structure or NULL
57if an error occurred.
58
789d6ddd
RL
59=head1 SEE ALSO
60
61L<UI_get_default_method(3)>
62
cc10f227
RL
63=head1 COPYRIGHT
64
61f805c1 65Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
cc10f227 66
4746f25a 67Licensed under the Apache License 2.0 (the "License"). You may not use
cc10f227
RL
68this file except in compliance with the License. You can obtain a copy
69in the file LICENSE in the source distribution or at
70L<https://www.openssl.org/source/license.html>.
71
72=cut