diff options
author | tb <> | 2020-06-15 15:25:46 +0000 |
---|---|---|
committer | tb <> | 2020-06-15 15:25:46 +0000 |
commit | ad47b62c64423c4b739312c5ae702b77cc85a974 (patch) | |
tree | ad2c9191a3b3bd5a999bbba5a05ce2f832ca3a97 /src | |
parent | be1a496d70a47f3c5c3dda88e02d5297c3913e2a (diff) | |
download | openbsd-ad47b62c64423c4b739312c5ae702b77cc85a974.tar.gz openbsd-ad47b62c64423c4b739312c5ae702b77cc85a974.tar.bz2 openbsd-ad47b62c64423c4b739312c5ae702b77cc85a974.zip |
Document EVP_read_pw_string_min(3)
Add detailed information on the return values of all the functions
in this page and remove the previous incorrect information.
tweaks & ok schwarze
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/des_read_pw.3 | 50 |
1 files changed, 44 insertions, 6 deletions
diff --git a/src/lib/libcrypto/man/des_read_pw.3 b/src/lib/libcrypto/man/des_read_pw.3 index 8c63a65fd2..55d36ef721 100644 --- a/src/lib/libcrypto/man/des_read_pw.3 +++ b/src/lib/libcrypto/man/des_read_pw.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: des_read_pw.3,v 1.8 2018/03/27 17:35:50 schwarze Exp $ | 1 | .\" $OpenBSD: des_read_pw.3,v 1.9 2020/06/15 15:25:46 tb Exp $ |
2 | .\" OpenSSL doc/crypto/ui_compat.pod May 14 11:28:00 2006 +0000 | 2 | .\" OpenSSL doc/crypto/ui_compat.pod May 14 11:28:00 2006 +0000 |
3 | .\" OpenSSL doc/crypto/des.pod 2a9aca32 Oct 25 08:44:10 2001 +0000 | 3 | .\" OpenSSL doc/crypto/des.pod 2a9aca32 Oct 25 08:44:10 2001 +0000 |
4 | .\" | 4 | .\" |
@@ -50,13 +50,14 @@ | |||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
52 | .\" | 52 | .\" |
53 | .Dd $Mdocdate: March 27 2018 $ | 53 | .Dd $Mdocdate: June 15 2020 $ |
54 | .Dt DES_READ_PW 3 | 54 | .Dt DES_READ_PW 3 |
55 | .Os | 55 | .Os |
56 | .Sh NAME | 56 | .Sh NAME |
57 | .Nm des_read_pw , | 57 | .Nm des_read_pw , |
58 | .Nm des_read_pw_string , | 58 | .Nm des_read_pw_string , |
59 | .Nm EVP_read_pw_string | 59 | .Nm EVP_read_pw_string , |
60 | .Nm EVP_read_pw_string_min | ||
60 | .Nd compatibility user interface functions | 61 | .Nd compatibility user interface functions |
61 | .Sh SYNOPSIS | 62 | .Sh SYNOPSIS |
62 | .In openssl/ui_compat.h | 63 | .In openssl/ui_compat.h |
@@ -83,6 +84,14 @@ | |||
83 | .Fa "const char *prompt" | 84 | .Fa "const char *prompt" |
84 | .Fa "int verify" | 85 | .Fa "int verify" |
85 | .Fc | 86 | .Fc |
87 | .Ft int | ||
88 | .Fo EVP_read_pw_string_min | ||
89 | .Fa "char *buf" | ||
90 | .Fa "int min_length" | ||
91 | .Fa "int length" | ||
92 | .Fa "const char *prompt" | ||
93 | .Fa "int verify" | ||
94 | .Fc | ||
86 | .Sh DESCRIPTION | 95 | .Sh DESCRIPTION |
87 | The DES library contained a few routines to prompt for passwords. | 96 | The DES library contained a few routines to prompt for passwords. |
88 | These aren't necessarily dependent on DES, and have therefore become | 97 | These aren't necessarily dependent on DES, and have therefore become |
@@ -107,8 +116,6 @@ The second password is stored in | |||
107 | which must therefore also be at least | 116 | which must therefore also be at least |
108 | .Fa length | 117 | .Fa length |
109 | bytes. | 118 | bytes. |
110 | A return code of -1 indicates a system error, 1 failure due to use | ||
111 | interaction, and 0 is success. | ||
112 | .Pp | 119 | .Pp |
113 | .Fn des_read_pw_string | 120 | .Fn des_read_pw_string |
114 | is a variant of | 121 | is a variant of |
@@ -126,8 +133,34 @@ uses | |||
126 | .Dv BUFSIZ . | 133 | .Dv BUFSIZ . |
127 | .Pp | 134 | .Pp |
128 | .Fn EVP_read_pw_string | 135 | .Fn EVP_read_pw_string |
129 | is functionally similar to | 136 | and |
137 | .Fn EVP_read_pw_string_min | ||
138 | are functionally similar to | ||
130 | .Fn des_read_pw_string . | 139 | .Fn des_read_pw_string . |
140 | .Fn EVP_read_pw_string_min | ||
141 | additionally checks that the password is at least | ||
142 | .Fa min_length | ||
143 | bytes long. | ||
144 | .Sh RETURN VALUES | ||
145 | These functions return 0 on success and a negative value on failure. | ||
146 | .Pp | ||
147 | They return -1 if | ||
148 | .Fa length | ||
149 | is less than or equal to zero or on memory allocation failure. | ||
150 | They return -1 or -2 if the internal call to | ||
151 | .Xr UI_process 3 | ||
152 | fails. | ||
153 | .Pp | ||
154 | In addition, | ||
155 | .Fa EVP_read_pw_string_min | ||
156 | returns -1 if | ||
157 | .Fa min_length | ||
158 | is negative, if | ||
159 | .Fa length | ||
160 | is less than or equal to | ||
161 | .Fa min_length , | ||
162 | or if the user entered a password shorter than | ||
163 | .Fa min_length . | ||
131 | .Sh SEE ALSO | 164 | .Sh SEE ALSO |
132 | .Xr UI_new 3 | 165 | .Xr UI_new 3 |
133 | .Sh HISTORY | 166 | .Sh HISTORY |
@@ -139,6 +172,11 @@ first appeared in SSLeay 0.5.1. | |||
139 | first appeared in SSLeay 0.8.0. | 172 | first appeared in SSLeay 0.8.0. |
140 | These functions have been available since | 173 | These functions have been available since |
141 | .Ox 2.4 . | 174 | .Ox 2.4 . |
175 | .Pp | ||
176 | .Fn EVP_read_pw_string_min | ||
177 | first appeared in OpenSSL 1.0.0 | ||
178 | and has been available since | ||
179 | .Ox 4.9 . | ||
142 | .Sh AUTHORS | 180 | .Sh AUTHORS |
143 | .An Richard Levitte Aq Mt richard@levitte.org | 181 | .An Richard Levitte Aq Mt richard@levitte.org |
144 | for the OpenSSL project. | 182 | for the OpenSSL project. |