]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/BIO_get_ex_new_index.pod
Document "get/set-app-data" macros.
[thirdparty/openssl.git] / doc / man3 / BIO_get_ex_new_index.pod
CommitLineData
e6390aca
RS
1=pod
2
3=head1 NAME
4
5BIO_get_ex_new_index, BIO_set_ex_data, BIO_get_ex_data,
d318389e 6BIO_set_app_data, BIO_get_app_data,
e6390aca
RS
7DH_get_ex_new_index, DH_set_ex_data, DH_get_ex_data,
8DSA_get_ex_new_index, DSA_set_ex_data, DSA_get_ex_data,
9ECDH_get_ex_new_index, ECDH_set_ex_data, ECDH_get_ex_data,
9b02dc97 10EC_KEY_get_ex_new_index, EC_KEY_set_ex_data, EC_KEY_get_ex_data,
d318389e
RS
11ENGINE_get_ex_new_index, ENGINE_set_ex_data, ENGINE_get_ex_data,
12RAND_DRBG_set_ex_data, RAND_DRBG_get_ex_data, RAND_DRBG_get_ex_new_index,
13RSA_get_ex_new_index, RSA_set_ex_data, RSA_get_ex_data,
14RSA_set_app_data, RSA_get_app_data,
15SSL_get_ex_new_index, SSL_set_ex_data, SSL_get_ex_data,
16SSL_set_app_data, SSL_get_app_data,
17SSL_CTX_get_ex_new_index, SSL_CTX_set_ex_data, SSL_CTX_get_ex_data,
18SSL_CTX_set_app_data, SSL_CTX_get_app_data,
19SSL_SESSION_get_ex_new_index, SSL_SESSION_set_ex_data, SSL_SESSION_get_ex_data,
20SSL_SESSION_set_app_data, SSL_SESSION_get_app_data,
21UI_get_ex_new_index, UI_set_ex_data, UI_get_ex_data,
22UI_set_app_data, UI_get_app_data,
23X509_STORE_CTX_get_ex_new_index, X509_STORE_CTX_set_ex_data, X509_STORE_CTX_get_ex_data,
24X509_STORE_CTX_set_app_data, X509_STORE_CTX_get_app_data,
25X509_STORE_get_ex_new_index, X509_STORE_set_ex_data, X509_STORE_get_ex_data,
26X509_get_ex_new_index, X509_set_ex_data, X509_get_ex_data
e6390aca
RS
27- application-specific data
28
c952780c 29=head1 SYNOPSIS
e6390aca 30
bb82531f 31=for openssl generic
b97fdb57 32
e6390aca
RS
33 #include <openssl/x509.h>
34
c952780c 35 int TYPE_get_ex_new_index(long argl, void *argp,
e9b77246
BB
36 CRYPTO_EX_new *new_func,
37 CRYPTO_EX_dup *dup_func,
38 CRYPTO_EX_free *free_func);
e6390aca 39
c952780c 40 int TYPE_set_ex_data(TYPE *d, int idx, void *arg);
e6390aca 41
c952780c 42 void *TYPE_get_ex_data(TYPE *d, int idx);
e6390aca 43
d318389e
RS
44 #define TYPE_set_app_data(TYPE *d, void *arg)
45 #define TYPE_get_app_data(TYPE *d)
46
e6390aca
RS
47=head1 DESCRIPTION
48
c952780c
RS
49In the description here, I<TYPE> is used a placeholder
50for any of the OpenSSL datatypes listed in
51L<CRYPTO_get_ex_new_index(3)>.
52
53These functions handle application-specific data for OpenSSL data
e6390aca
RS
54structures.
55
c952780c
RS
56TYPE_get_new_ex_index() is a macro that calls CRYPTO_get_ex_new_index()
57with the correct B<index> value.
58
59TYPE_set_ex_data() is a function that calls CRYPTO_set_ex_data() with
60an offset into the opaque exdata part of the TYPE object.
61
a970b14f 62TYPE_get_ex_data() is a function that calls CRYPTO_get_ex_data() with
c952780c 63an offset into the opaque exdata part of the TYPE object.
e6390aca 64
d318389e
RS
65For compatibility with previous releases, the exdata index of zero is
66reserved for "application data." There are two convenience functions for
67this.
68TYPE_set_app_data() is a macro that invokes TYPE_set_ex_data() with
69B<idx> set to zero.
70TYPE_get_app_data() is a macro that invokes TYPE_get_ex_data() with
71B<idx> set to zero.
72Note that these functions are not defined for the B<RAND_DRBG> type because
73there are no backward compatibility concerns.
74
1f13ad31
PY
75=head1 RETURN VALUES
76
77TYPE_get_new_ex_index() returns a new index on success or -1 on error.
78
79TYPE_set_ex_data() returns 1 on success or 0 on error.
80
81TYPE_get_ex_data() returns the application data or NULL if an error occurred.
82
e6390aca
RS
83=head1 SEE ALSO
84
85L<CRYPTO_get_ex_new_index(3)>.
86
e2f92610
RS
87=head1 COPYRIGHT
88
61f805c1 89Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
e2f92610 90
4746f25a 91Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
92this file except in compliance with the License. You can obtain a copy
93in the file LICENSE in the source distribution or at
94L<https://www.openssl.org/source/license.html>.
95
96=cut