summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/CRYPTO_set_ex_data.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/CRYPTO_set_ex_data.3')
-rw-r--r--src/lib/libcrypto/man/CRYPTO_set_ex_data.370
1 files changed, 70 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/CRYPTO_set_ex_data.3 b/src/lib/libcrypto/man/CRYPTO_set_ex_data.3
new file mode 100644
index 0000000000..1be42dedd9
--- /dev/null
+++ b/src/lib/libcrypto/man/CRYPTO_set_ex_data.3
@@ -0,0 +1,70 @@
1.Dd $Mdocdate: November 11 2015 $
2.Dt CRYPTO_SET_EX_DATA 3
3.Os
4.Sh NAME
5.Nm CRYPTO_set_ex_data ,
6.Nm CRYPTO_get_ex_data
7.Nd internal application specific data functions
8.Sh SYNOPSIS
9.In openssl/crypto.h
10.Ft int
11.Fo CRYPTO_set_ex_data
12.Fa "CRYPTO_EX_DATA *r"
13.Fa "int idx"
14.Fa "void *arg"
15.Fc
16.Ft void *
17.Fo CRYPTO_get_ex_data
18.Fa "CRYPTO_EX_DATA *r"
19.Fa "int idx"
20.Fc
21.Sh DESCRIPTION
22Several OpenSSL structures can have application specific data attached
23to them.
24These functions are used internally by OpenSSL to manipulate application
25specific data attached to a specific structure.
26.Pp
27These functions should only be used by applications to manipulate
28.Vt CRYPTO_EX_DATA
29structures passed to the
30.Fn new_func ,
31.Fn free_func ,
32and
33.Fn dup_func
34callbacks: as passed to
35.Xr RSA_get_ex_new_index 3
36for example.
37.Pp
38.Fn CRYPTO_set_ex_data
39is used to set application specific data, the data is supplied in the
40.Fa arg
41parameter and its precise meaning is up to the application.
42.Pp
43.Fn CRYPTO_get_ex_data
44is used to retrieve application specific data.
45The data is returned to the application, this will be the same value as
46supplied to a previous
47.Fn CRYPTO_set_ex_data
48call.
49.Sh RETURN VALUES
50.Fn CRYPTO_set_ex_data
51returns 1 on success or 0 on failure.
52.Pp
53.Fn CRYPTO_get_ex_data
54returns the application data or 0 on failure.
550 may also be valid application data but currently it can only fail if
56given an invalid
57.Fa idx
58parameter.
59.Pp
60On failure an error code can be obtained from
61.Xr ERR_get_error 3 .
62.Sh SEE ALSO
63.Xr DH_get_ex_new_index 3 ,
64.Xr DSA_get_ex_new_index 3 ,
65.Xr RSA_get_ex_new_index 3
66.Sh HISTORY
67.Fn CRYPTO_set_ex_data
68and
69.Fn CRYPTO_get_ex_data
70have been available since SSLeay 0.9.0.