summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/RAND_set_rand_method.pod
diff options
context:
space:
mode:
authormarkus <>2002-09-14 11:18:04 +0000
committermarkus <>2002-09-14 11:18:04 +0000
commit3a3a489a756f2852d798376f20cc0d4ab609c866 (patch)
tree2a4277fc9b7635e82c33faa3bae9f9380bc639e8 /src/lib/libcrypto/doc/RAND_set_rand_method.pod
parent82d2611e1bb67683df1bb201dcc2afbff4c76980 (diff)
downloadopenbsd-3a3a489a756f2852d798376f20cc0d4ab609c866.tar.gz
openbsd-3a3a489a756f2852d798376f20cc0d4ab609c866.tar.bz2
openbsd-3a3a489a756f2852d798376f20cc0d4ab609c866.zip
merge with openssl-0.9.7-stable-SNAP-20020911,
new minor for libcrypto (_X509_REQ_print_ex) tested by miod@, pb@
Diffstat (limited to 'src/lib/libcrypto/doc/RAND_set_rand_method.pod')
-rw-r--r--src/lib/libcrypto/doc/RAND_set_rand_method.pod44
1 files changed, 34 insertions, 10 deletions
diff --git a/src/lib/libcrypto/doc/RAND_set_rand_method.pod b/src/lib/libcrypto/doc/RAND_set_rand_method.pod
index 464eba416d..c9bb6d9f27 100644
--- a/src/lib/libcrypto/doc/RAND_set_rand_method.pod
+++ b/src/lib/libcrypto/doc/RAND_set_rand_method.pod
@@ -8,22 +8,30 @@ RAND_set_rand_method, RAND_get_rand_method, RAND_SSLeay - select RAND method
8 8
9 #include <openssl/rand.h> 9 #include <openssl/rand.h>
10 10
11 void RAND_set_rand_method(RAND_METHOD *meth); 11 void RAND_set_rand_method(const RAND_METHOD *meth);
12 12
13 RAND_METHOD *RAND_get_rand_method(void); 13 const RAND_METHOD *RAND_get_rand_method(void);
14 14
15 RAND_METHOD *RAND_SSLeay(void); 15 RAND_METHOD *RAND_SSLeay(void);
16 16
17=head1 DESCRIPTION 17=head1 DESCRIPTION
18 18
19A B<RAND_METHOD> specifies the functions that OpenSSL uses for random 19A B<RAND_METHOD> specifies the functions that OpenSSL uses for random number
20number generation. By modifying the method, alternative 20generation. By modifying the method, alternative implementations such as
21implementations such as hardware RNGs may be used. Initially, the 21hardware RNGs may be used. IMPORTANT: See the NOTES section for important
22default is to use the OpenSSL internal implementation. RAND_SSLeay() 22information about how these RAND API functions are affected by the use of
23returns a pointer to that method. 23B<ENGINE> API calls.
24 24
25RAND_set_rand_method() sets the RAND method to B<meth>. 25Initially, the default RAND_METHOD is the OpenSSL internal implementation, as
26RAND_get_rand_method() returns a pointer to the current method. 26returned by RAND_SSLeay().
27
28RAND_set_default_method() makes B<meth> the method for PRNG use. B<NB>: This is
29true only whilst no ENGINE has been set as a default for RAND, so this function
30is no longer recommended.
31
32RAND_get_default_method() returns a pointer to the current RAND_METHOD.
33However, the meaningfulness of this result is dependant on whether the ENGINE
34API is being used, so this function is no longer recommended.
27 35
28=head1 THE RAND_METHOD STRUCTURE 36=head1 THE RAND_METHOD STRUCTURE
29 37
@@ -47,13 +55,29 @@ Each component may be NULL if the function is not implemented.
47RAND_set_rand_method() returns no value. RAND_get_rand_method() and 55RAND_set_rand_method() returns no value. RAND_get_rand_method() and
48RAND_SSLeay() return pointers to the respective methods. 56RAND_SSLeay() return pointers to the respective methods.
49 57
58=head1 NOTES
59
60As of version 0.9.7, RAND_METHOD implementations are grouped together with other
61algorithmic APIs (eg. RSA_METHOD, EVP_CIPHER, etc) in B<ENGINE> modules. If a
62default ENGINE is specified for RAND functionality using an ENGINE API function,
63that will override any RAND defaults set using the RAND API (ie.
64RAND_set_rand_method()). For this reason, the ENGINE API is the recommended way
65to control default implementations for use in RAND and other cryptographic
66algorithms.
67
50=head1 SEE ALSO 68=head1 SEE ALSO
51 69
52L<rand(3)|rand(3)> 70L<rand(3)|rand(3)>, L<engine(3)|engine(3)>
53 71
54=head1 HISTORY 72=head1 HISTORY
55 73
56RAND_set_rand_method(), RAND_get_rand_method() and RAND_SSLeay() are 74RAND_set_rand_method(), RAND_get_rand_method() and RAND_SSLeay() are
57available in all versions of OpenSSL. 75available in all versions of OpenSSL.
58 76
77In the engine version of version 0.9.6, RAND_set_rand_method() was altered to
78take an ENGINE pointer as its argument. As of version 0.9.7, that has been
79reverted as the ENGINE API transparently overrides RAND defaults if used,
80otherwise RAND API functions work as before. RAND_set_rand_engine() was also
81introduced in version 0.9.7.
82
59=cut 83=cut