summaryrefslogtreecommitdiffstats
path: root/secure/lib/libcrypto/man/RAND_set_rand_method.3
diff options
context:
space:
mode:
Diffstat (limited to 'secure/lib/libcrypto/man/RAND_set_rand_method.3')
-rw-r--r--secure/lib/libcrypto/man/RAND_set_rand_method.347
1 files changed, 35 insertions, 12 deletions
diff --git a/secure/lib/libcrypto/man/RAND_set_rand_method.3 b/secure/lib/libcrypto/man/RAND_set_rand_method.3
index 3c28fed..d38d589 100644
--- a/secure/lib/libcrypto/man/RAND_set_rand_method.3
+++ b/secure/lib/libcrypto/man/RAND_set_rand_method.3
@@ -1,5 +1,5 @@
.\" Automatically generated by Pod::Man version 1.15
-.\" Tue Jul 30 09:21:48 2002
+.\" Mon Jan 13 19:28:29 2003
.\"
.\" Standard preamble:
.\" ======================================================================
@@ -138,7 +138,7 @@
.\" ======================================================================
.\"
.IX Title "RAND_set_rand_method 3"
-.TH RAND_set_rand_method 3 "0.9.6e" "2000-04-13" "OpenSSL"
+.TH RAND_set_rand_method 3 "0.9.7" "2003-01-13" "OpenSSL"
.UC
.SH "NAME"
RAND_set_rand_method, RAND_get_rand_method, RAND_SSLeay \- select \s-1RAND\s0 method
@@ -148,24 +148,32 @@ RAND_set_rand_method, RAND_get_rand_method, RAND_SSLeay \- select \s-1RAND\s0 me
\& #include <openssl/rand.h>
.Ve
.Vb 1
-\& void RAND_set_rand_method(RAND_METHOD *meth);
+\& void RAND_set_rand_method(const RAND_METHOD *meth);
.Ve
.Vb 1
-\& RAND_METHOD *RAND_get_rand_method(void);
+\& const RAND_METHOD *RAND_get_rand_method(void);
.Ve
.Vb 1
\& RAND_METHOD *RAND_SSLeay(void);
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
-A \fB\s-1RAND_METHOD\s0\fR specifies the functions that OpenSSL uses for random
-number generation. By modifying the method, alternative
-implementations such as hardware RNGs may be used. Initially, the
-default is to use the OpenSSL internal implementation. \fIRAND_SSLeay()\fR
-returns a pointer to that method.
+A \fB\s-1RAND_METHOD\s0\fR specifies the functions that OpenSSL uses for random number
+generation. By modifying the method, alternative implementations such as
+hardware RNGs may be used. \s-1IMPORTANT:\s0 See the \s-1NOTES\s0 section for important
+information about how these \s-1RAND\s0 \s-1API\s0 functions are affected by the use of
+\&\fB\s-1ENGINE\s0\fR \s-1API\s0 calls.
.PP
-\&\fIRAND_set_rand_method()\fR sets the \s-1RAND\s0 method to \fBmeth\fR.
-\&\fIRAND_get_rand_method()\fR returns a pointer to the current method.
+Initially, the default \s-1RAND_METHOD\s0 is the OpenSSL internal implementation, as
+returned by \fIRAND_SSLeay()\fR.
+.PP
+\&\fIRAND_set_default_method()\fR makes \fBmeth\fR the method for \s-1PRNG\s0 use. \fB\s-1NB\s0\fR: This is
+true only whilst no \s-1ENGINE\s0 has been set as a default for \s-1RAND\s0, so this function
+is no longer recommended.
+.PP
+\&\fIRAND_get_default_method()\fR returns a pointer to the current \s-1RAND_METHOD\s0.
+However, the meaningfulness of this result is dependant on whether the \s-1ENGINE\s0
+\&\s-1API\s0 is being used, so this function is no longer recommended.
.SH "THE RAND_METHOD STRUCTURE"
.IX Header "THE RAND_METHOD STRUCTURE"
.Vb 9
@@ -187,10 +195,25 @@ Each component may be \s-1NULL\s0 if the function is not implemented.
.IX Header "RETURN VALUES"
\&\fIRAND_set_rand_method()\fR returns no value. \fIRAND_get_rand_method()\fR and
\&\fIRAND_SSLeay()\fR return pointers to the respective methods.
+.SH "NOTES"
+.IX Header "NOTES"
+As of version 0.9.7, \s-1RAND_METHOD\s0 implementations are grouped together with other
+algorithmic APIs (eg. \s-1RSA_METHOD\s0, \s-1EVP_CIPHER\s0, etc) in \fB\s-1ENGINE\s0\fR modules. If a
+default \s-1ENGINE\s0 is specified for \s-1RAND\s0 functionality using an \s-1ENGINE\s0 \s-1API\s0 function,
+that will override any \s-1RAND\s0 defaults set using the \s-1RAND\s0 \s-1API\s0 (ie.
+\&\fIRAND_set_rand_method()\fR). For this reason, the \s-1ENGINE\s0 \s-1API\s0 is the recommended way
+to control default implementations for use in \s-1RAND\s0 and other cryptographic
+algorithms.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
-rand(3)
+rand(3), engine(3)
.SH "HISTORY"
.IX Header "HISTORY"
\&\fIRAND_set_rand_method()\fR, \fIRAND_get_rand_method()\fR and \fIRAND_SSLeay()\fR are
available in all versions of OpenSSL.
+.PP
+In the engine version of version 0.9.6, \fIRAND_set_rand_method()\fR was altered to
+take an \s-1ENGINE\s0 pointer as its argument. As of version 0.9.7, that has been
+reverted as the \s-1ENGINE\s0 \s-1API\s0 transparently overrides \s-1RAND\s0 defaults if used,
+otherwise \s-1RAND\s0 \s-1API\s0 functions work as before. \fIRAND_set_rand_engine()\fR was also
+introduced in version 0.9.7.
OpenPOWER on IntegriCloud