summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2018-12-24 10:07:22 +0000
committerschwarze <>2018-12-24 10:07:22 +0000
commit570bdfdcca6456a7407cf20a8edff872b64f8a0c (patch)
tree401825c06257aff4722c816ebe58861cdbbe9cbd
parent71a171566d3cd3517aaee19b14a25f1ca7ca70d0 (diff)
downloadopenbsd-570bdfdcca6456a7407cf20a8edff872b64f8a0c.tar.gz
openbsd-570bdfdcca6456a7407cf20a8edff872b64f8a0c.tar.bz2
openbsd-570bdfdcca6456a7407cf20a8edff872b64f8a0c.zip
Make this page much more readable by deleting as much text as possible
about functions that are deprecated, identical to other functions, and never made sense in the first place. As deraadt@ points out, we should not hide the information that matters in a heap of clutter. It would waste reader's time and make confusion and accidental misuse more likely. OK deraadt@ jmc@
-rw-r--r--src/lib/libcrypto/man/BN_rand.337
1 files changed, 9 insertions, 28 deletions
diff --git a/src/lib/libcrypto/man/BN_rand.3 b/src/lib/libcrypto/man/BN_rand.3
index a0b1ab9f6c..b5966bcfa2 100644
--- a/src/lib/libcrypto/man/BN_rand.3
+++ b/src/lib/libcrypto/man/BN_rand.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: BN_rand.3,v 1.13 2018/12/22 00:03:51 schwarze Exp $ 1.\" $OpenBSD: BN_rand.3,v 1.14 2018/12/24 10:07:22 schwarze Exp $
2.\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400 2.\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400
3.\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 3.\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100
4.\" 4.\"
@@ -50,13 +50,13 @@
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: December 22 2018 $ 53.Dd $Mdocdate: December 24 2018 $
54.Dt BN_RAND 3 54.Dt BN_RAND 3
55.Os 55.Os
56.Sh NAME 56.Sh NAME
57.Nm BN_rand , 57.Nm BN_rand ,
58.Nm BN_pseudo_rand ,
59.Nm BN_rand_range , 58.Nm BN_rand_range ,
59.Nm BN_pseudo_rand ,
60.Nm BN_pseudo_rand_range 60.Nm BN_pseudo_rand_range
61.Nd generate pseudo-random number 61.Nd generate pseudo-random number
62.Sh SYNOPSIS 62.Sh SYNOPSIS
@@ -69,22 +69,10 @@
69.Fa "int bottom" 69.Fa "int bottom"
70.Fc 70.Fc
71.Ft int 71.Ft int
72.Fo BN_pseudo_rand
73.Fa "BIGNUM *rnd"
74.Fa "int bits"
75.Fa "int top"
76.Fa "int bottom"
77.Fc
78.Ft int
79.Fo BN_rand_range 72.Fo BN_rand_range
80.Fa "BIGNUM *rnd" 73.Fa "BIGNUM *rnd"
81.Fa "BIGNUM *range" 74.Fa "BIGNUM *range"
82.Fc 75.Fc
83.Ft int
84.Fo BN_pseudo_rand_range
85.Fa "BIGNUM *rnd"
86.Fa "BIGNUM *range"
87.Fc
88.Sh DESCRIPTION 76.Sh DESCRIPTION
89.Fn BN_rand 77.Fn BN_rand
90generates a cryptographically strong pseudo-random number of 78generates a cryptographically strong pseudo-random number of
@@ -114,17 +102,18 @@ is +1 then
114.Fa top 102.Fa top
115cannot also be 1. 103cannot also be 1.
116.Pp 104.Pp
117.Fn BN_pseudo_rand
118is a deprecated alias for
119.Fn BN_rand .
120.Pp
121.Fn BN_rand_range 105.Fn BN_rand_range
122generates a cryptographically strong pseudo-random number 106generates a cryptographically strong pseudo-random number
123.Fa rnd 107.Fa rnd
124in the range 0 <= 108in the range 0 <=
125.Fa rnd No < Fa range . 109.Fa rnd No < Fa range .
126.Fn BN_pseudo_rand_range 110.Pp
111.Fn BN_pseudo_rand
127is a deprecated alias for 112is a deprecated alias for
113.Fn BN_rand ,
114and
115.Fn BN_pseudo_rand_range
116for
128.Fn BN_rand_range . 117.Fn BN_rand_range .
129.Sh RETURN VALUES 118.Sh RETURN VALUES
130The functions return 1 on success, 0 on error. 119The functions return 1 on success, 0 on error.
@@ -140,17 +129,9 @@ The error codes can be obtained by
140first appeared in SSLeay 0.5.1 and has been available since 129first appeared in SSLeay 0.5.1 and has been available since
141.Ox 2.4 . 130.Ox 2.4 .
142.Pp 131.Pp
143.Fn BN_pseudo_rand
144first appeared in OpenSSL 0.9.5 and has been available since
145.Ox 2.7 .
146.Pp
147The 132The
148.Fa top 133.Fa top
149== -1 case and the function 134== -1 case and the function
150.Fn BN_rand_range 135.Fn BN_rand_range
151first appeared in OpenSSL 0.9.6a and have been available since 136first appeared in OpenSSL 0.9.6a and have been available since
152.Ox 3.0 . 137.Ox 3.0 .
153.Pp
154.Fn BN_pseudo_rand_range
155first appeared in OpenSSL 0.9.6c and have been available since
156.Ox 3.2 .