summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2020-06-15 15:25:46 +0000
committertb <>2020-06-15 15:25:46 +0000
commitad47b62c64423c4b739312c5ae702b77cc85a974 (patch)
treead2c9191a3b3bd5a999bbba5a05ce2f832ca3a97 /src
parentbe1a496d70a47f3c5c3dda88e02d5297c3913e2a (diff)
downloadopenbsd-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.350
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
87The DES library contained a few routines to prompt for passwords. 96The DES library contained a few routines to prompt for passwords.
88These aren't necessarily dependent on DES, and have therefore become 97These aren't necessarily dependent on DES, and have therefore become
@@ -107,8 +116,6 @@ The second password is stored in
107which must therefore also be at least 116which must therefore also be at least
108.Fa length 117.Fa length
109bytes. 118bytes.
110A return code of -1 indicates a system error, 1 failure due to use
111interaction, and 0 is success.
112.Pp 119.Pp
113.Fn des_read_pw_string 120.Fn des_read_pw_string
114is a variant of 121is 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
129is functionally similar to 136and
137.Fn EVP_read_pw_string_min
138are functionally similar to
130.Fn des_read_pw_string . 139.Fn des_read_pw_string .
140.Fn EVP_read_pw_string_min
141additionally checks that the password is at least
142.Fa min_length
143bytes long.
144.Sh RETURN VALUES
145These functions return 0 on success and a negative value on failure.
146.Pp
147They return -1 if
148.Fa length
149is less than or equal to zero or on memory allocation failure.
150They return -1 or -2 if the internal call to
151.Xr UI_process 3
152fails.
153.Pp
154In addition,
155.Fa EVP_read_pw_string_min
156returns -1 if
157.Fa min_length
158is negative, if
159.Fa length
160is less than or equal to
161.Fa min_length ,
162or 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.
139first appeared in SSLeay 0.8.0. 172first appeared in SSLeay 0.8.0.
140These functions have been available since 173These functions have been available since
141.Ox 2.4 . 174.Ox 2.4 .
175.Pp
176.Fn EVP_read_pw_string_min
177first appeared in OpenSSL 1.0.0
178and 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
144for the OpenSSL project. 182for the OpenSSL project.