]>
Commit | Line | Data |
---|---|---|
a73d990e DMSP |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | RAND_DRBG_set_ex_data, | |
6 | RAND_DRBG_get_ex_data, | |
7 | RAND_DRBG_get_ex_new_index | |
8 | - store and retrieve extra data from the DRBG instance | |
9 | ||
10 | =head1 SYNOPSIS | |
11 | ||
12 | #include <openssl/rand_drbg.h> | |
13 | ||
14 | int RAND_DRBG_set_ex_data(RAND_DRBG *drbg, int idx, void *data); | |
15 | ||
16 | void *RAND_DRBG_get_ex_data(const RAND_DRBG *drbg, int idx); | |
17 | ||
18 | int RAND_DRBG_get_ex_new_index(long argl, void *argp, | |
19 | CRYPTO_EX_new *new_func, | |
20 | CRYPTO_EX_dup *dup_func, | |
21 | CRYPTO_EX_free *free_func); | |
22 | ||
23 | ||
24 | ||
25 | =head1 DESCRIPTION | |
26 | ||
27 | RAND_DRBG_set_ex_data() enables an application to store arbitrary application | |
28 | specific data B<data> in a RAND_DRBG instance B<drbg>. The index B<idx> should | |
29 | be a value previously returned from a call to RAND_DRBG_get_ex_new_index(). | |
30 | ||
31 | RAND_DRBG_get_ex_data() retrieves application specific data previously stored | |
32 | in an RAND_DRBG instance B<drbg>. The B<idx> value should be the same as that | |
33 | used when originally storing the data. | |
34 | ||
35 | For more detailed information see L<CRYPTO_get_ex_data(3)> and | |
36 | L<CRYPTO_set_ex_data(3)> which implement these functions and | |
37 | L<CRYPTO_get_ex_new_index(3)> for generating a unique index. | |
38 | ||
39 | =head1 RETURN VALUES | |
40 | ||
41 | RAND_DRBG_set_ex_data() returns 1 for success or 0 for failure. | |
42 | ||
43 | RAND_DRBG_get_ex_data() returns the previously stored value or NULL on | |
44 | failure. NULL may also be a valid value. | |
45 | ||
46 | ||
47 | =head1 NOTES | |
48 | ||
49 | RAND_DRBG_get_ex_new_index(...) is implemented as a macro and equivalent to | |
50 | CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DRBG,...). | |
51 | ||
52 | =head1 SEE ALSO | |
53 | ||
54 | L<CRYPTO_get_ex_data(3)>, | |
55 | L<CRYPTO_set_ex_data(3)>, | |
56 | L<CRYPTO_get_ex_new_index(3)>, | |
57 | L<RAND_DRBG(7)> | |
58 | ||
59 | =head1 COPYRIGHT | |
60 | ||
61 | Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved. | |
62 | ||
4746f25a | 63 | Licensed under the Apache License 2.0 (the "License"). You may not use |
a73d990e DMSP |
64 | this file except in compliance with the License. You can obtain a copy |
65 | in the file LICENSE in the source distribution or at | |
66 | L<https://www.openssl.org/source/license.html>. | |
67 | ||
68 | =cut |