summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/doc/RAND_set_rand_method.pod
diff options
context:
space:
mode:
authormiod <>2014-07-09 17:56:43 +0000
committermiod <>2014-07-09 17:56:43 +0000
commitb5fe35f9c15f1a36f0f78d02fdaa6e211a2cc76a (patch)
tree5be9b59ec7ebadf006e37ac06006c858c860f945 /src/lib/libcrypto/doc/RAND_set_rand_method.pod
parent8f147593f649791212451b70b61f2560f8cd408b (diff)
downloadopenbsd-b5fe35f9c15f1a36f0f78d02fdaa6e211a2cc76a.tar.gz
openbsd-b5fe35f9c15f1a36f0f78d02fdaa6e211a2cc76a.tar.bz2
openbsd-b5fe35f9c15f1a36f0f78d02fdaa6e211a2cc76a.zip
Update to match the current state of crypto/rand, and remove MLINKS for
RAND_event and RAND_screen.
Diffstat (limited to 'src/lib/libcrypto/doc/RAND_set_rand_method.pod')
-rw-r--r--src/lib/libcrypto/doc/RAND_set_rand_method.pod55
1 files changed, 6 insertions, 49 deletions
diff --git a/src/lib/libcrypto/doc/RAND_set_rand_method.pod b/src/lib/libcrypto/doc/RAND_set_rand_method.pod
index e5b780fad0..c02068bf76 100644
--- a/src/lib/libcrypto/doc/RAND_set_rand_method.pod
+++ b/src/lib/libcrypto/doc/RAND_set_rand_method.pod
@@ -16,58 +16,15 @@ RAND_set_rand_method, RAND_get_rand_method, RAND_SSLeay - select RAND method
16 16
17=head1 DESCRIPTION 17=head1 DESCRIPTION
18 18
19A B<RAND_METHOD> specifies the functions that OpenSSL uses for random number 19These functions used to allow for the random number generator functions
20generation. By modifying the method, alternative implementations such as 20to be replaced by arbitrary code.
21hardware RNGs may be used. IMPORTANT: See the NOTES section for important 21
22information about how these RAND API functions are affected by the use of 22They are kept for ABI compatibility but are no longer functional, and
23B<ENGINE> API calls. 23should not be used in new programs.
24
25Initially, the default RAND_METHOD is the OpenSSL internal implementation, as
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 dependent on whether the ENGINE
34API is being used, so this function is no longer recommended.
35
36=head1 THE RAND_METHOD STRUCTURE
37
38 typedef struct rand_meth_st
39 {
40 void (*seed)(const void *buf, int num);
41 int (*bytes)(unsigned char *buf, int num);
42 void (*cleanup)(void);
43 void (*add)(const void *buf, int num, int entropy);
44 int (*pseudorand)(unsigned char *buf, int num);
45 int (*status)(void);
46 } RAND_METHOD;
47
48The components point to the implementation of RAND_seed(),
49RAND_bytes(), RAND_cleanup(), RAND_add(), RAND_pseudo_rand()
50and RAND_status().
51Each component may be NULL if the function is not implemented.
52
53=head1 RETURN VALUES
54
55RAND_set_rand_method() returns no value. RAND_get_rand_method() and
56RAND_SSLeay() return pointers to the respective methods.
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 24
68=head1 SEE ALSO 25=head1 SEE ALSO
69 26
70L<rand(3)|rand(3)>, L<engine(3)|engine(3)> 27L<rand(3)|rand(3)>
71 28
72=head1 HISTORY 29=head1 HISTORY
73 30