1CRYPTO_set_ex_data(3) OpenSSL CRYPTO_set_ex_data(3)
2
3
4
6 CRYPTO_set_ex_data, CRYPTO_get_ex_data - internal application specific
7 data functions
8
10 #include <openssl/crypto.h>
11
12 int CRYPTO_set_ex_data(CRYPTO_EX_DATA *r, int idx, void *arg);
13
14 void *CRYPTO_get_ex_data(CRYPTO_EX_DATA *r, int idx);
15
17 Several OpenSSL structures can have application specific data attached
18 to them. These functions are used internally by OpenSSL to manipulate
19 application specific data attached to a specific structure.
20
21 These functions should only be used by applications to manipulate
22 CRYPTO_EX_DATA structures passed to the new_func(), free_func() and
23 dup_func() callbacks: as passed to RSA_get_ex_new_index() for example.
24
25 CRYPTO_set_ex_data() is used to set application specific data, the data
26 is supplied in the arg parameter and its precise meaning is up to the
27 application.
28
29 CRYPTO_get_ex_data() is used to retrieve application specific data. The
30 data is returned to the application, this will be the same value as
31 supplied to a previous CRYPTO_set_ex_data() call.
32
34 CRYPTO_set_ex_data() returns 1 on success or 0 on failure.
35
36 CRYPTO_get_ex_data() returns the application data or 0 on failure. 0
37 may also be valid application data but currently it can only fail if
38 given an invalid idx parameter.
39
40 On failure an error code can be obtained from ERR_get_error(3).
41
43 RSA_get_ex_new_index(3), DSA_get_ex_new_index(3),
44 DH_get_ex_new_index(3)
45
47 CRYPTO_set_ex_data() and CRYPTO_get_ex_data() have been available since
48 SSLeay 0.9.0.
49
50
51
521.0.2o 2020-08-01 CRYPTO_set_ex_data(3)