1=pod 2 3=head1 NAME 4 5BIO_get_ex_new_index, BIO_set_ex_data, BIO_get_ex_data, 6BIO_set_app_data, BIO_get_app_data, 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, 9EC_KEY_get_ex_new_index, EC_KEY_set_ex_data, EC_KEY_get_ex_data, 10ENGINE_get_ex_new_index, ENGINE_set_ex_data, ENGINE_get_ex_data, 11EVP_PKEY_get_ex_new_index, EVP_PKEY_set_ex_data, EVP_PKEY_get_ex_data, 12RSA_get_ex_new_index, RSA_set_ex_data, RSA_get_ex_data, 13RSA_set_app_data, RSA_get_app_data, 14SSL_get_ex_new_index, SSL_set_ex_data, SSL_get_ex_data, 15SSL_set_app_data, SSL_get_app_data, 16SSL_CTX_get_ex_new_index, SSL_CTX_set_ex_data, SSL_CTX_get_ex_data, 17SSL_CTX_set_app_data, SSL_CTX_get_app_data, 18SSL_SESSION_get_ex_new_index, SSL_SESSION_set_ex_data, SSL_SESSION_get_ex_data, 19SSL_SESSION_set_app_data, SSL_SESSION_get_app_data, 20UI_get_ex_new_index, UI_set_ex_data, UI_get_ex_data, 21UI_set_app_data, UI_get_app_data, 22X509_STORE_CTX_get_ex_new_index, X509_STORE_CTX_set_ex_data, X509_STORE_CTX_get_ex_data, 23X509_STORE_CTX_set_app_data, X509_STORE_CTX_get_app_data, 24X509_STORE_get_ex_new_index, X509_STORE_set_ex_data, X509_STORE_get_ex_data, 25X509_get_ex_new_index, X509_set_ex_data, X509_get_ex_data 26- application-specific data 27 28=head1 SYNOPSIS 29 30=for openssl generic 31 32 #include <openssl/x509.h> 33 34 int TYPE_get_ex_new_index(long argl, void *argp, 35 CRYPTO_EX_new *new_func, 36 CRYPTO_EX_dup *dup_func, 37 CRYPTO_EX_free *free_func); 38 39 int TYPE_set_ex_data(TYPE *d, int idx, void *arg); 40 41 void *TYPE_get_ex_data(const TYPE *d, int idx); 42 43 #define TYPE_set_app_data(TYPE *d, void *arg) 44 #define TYPE_get_app_data(TYPE *d) 45 46The following functions have been deprecated since OpenSSL 3.0, and can be 47hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value, 48see L<openssl_user_macros(7)>: 49 50 int DH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, 51 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); 52 int DH_set_ex_data(DH *type, int idx, void *arg); 53 void *DH_get_ex_data(DH *type, int idx); 54 int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, 55 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); 56 int DSA_set_ex_data(DSA *type, int idx, void *arg); 57 void *DSA_get_ex_data(DSA *type, int idx); 58 int EC_KEY_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, 59 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); 60 int EC_KEY_set_ex_data(EC_KEY *type, int idx, void *arg); 61 void *EC_KEY_get_ex_data(EC_KEY *type, int idx); 62 int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, 63 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); 64 int RSA_set_ex_data(RSA *type, int idx, void *arg); 65 void *RSA_get_ex_data(RSA *type, int idx); 66 int RSA_set_app_data(RSA *type, void *arg); 67 void *RSA_get_app_data(RSA *type); 68 int ENGINE_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, 69 CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); 70 int ENGINE_set_ex_data(ENGINE *type, int idx, void *arg); 71 void *ENGINE_get_ex_data(ENGINE *type, int idx); 72 73=head1 DESCRIPTION 74 75In the description here, I<TYPE> is used a placeholder 76for any of the OpenSSL datatypes listed in L<CRYPTO_get_ex_new_index(3)>. 77 78All functions with a I<TYPE> of B<DH>, B<DSA>, B<RSA> and B<EC_KEY> are deprecated. 79Applications should instead use EVP_PKEY_set_ex_data(), 80EVP_PKEY_get_ex_data() and EVP_PKEY_get_ex_new_index(). 81 82All functions with a I<TYPE> of B<ENGINE> are deprecated. 83Applications using engines should be replaced by providers. 84 85These functions handle application-specific data for OpenSSL data 86structures. 87 88TYPE_get_ex_new_index() is a macro that calls CRYPTO_get_ex_new_index() 89with the correct B<index> value. 90 91TYPE_set_ex_data() is a function that calls CRYPTO_set_ex_data() with 92an offset into the opaque exdata part of the TYPE object. I<d> B<MUST NOT> be NULL. 93 94TYPE_get_ex_data() is a function that calls CRYPTO_get_ex_data() with 95an offset into the opaque exdata part of the TYPE object. I<d> B<MUST NOT> be NULL. 96 97For compatibility with previous releases, the exdata index of zero is 98reserved for "application data." There are two convenience functions for 99this. 100TYPE_set_app_data() is a macro that invokes TYPE_set_ex_data() with 101B<idx> set to zero. 102TYPE_get_app_data() is a macro that invokes TYPE_get_ex_data() with 103B<idx> set to zero. 104 105=head1 RETURN VALUES 106 107TYPE_get_ex_new_index() returns a new index on success or -1 on error. 108 109TYPE_set_ex_data() returns 1 on success or 0 on error. 110 111TYPE_get_ex_data() returns the application data or NULL if an error occurred. 112 113=head1 SEE ALSO 114 115L<CRYPTO_get_ex_new_index(3)>. 116 117=head1 HISTORY 118 119The functions DH_get_ex_new_index(), DH_set_ex_data(), DH_get_ex_data(), 120DSA_get_ex_new_index(), DSA_set_ex_data(), DSA_get_ex_data(), 121EC_KEY_get_ex_new_index(), EC_KEY_set_ex_data(), EC_KEY_get_ex_data(), 122ENGINE_get_ex_new_index(), ENGINE_set_ex_data(), ENGINE_get_ex_data(), 123RSA_get_ex_new_index(), RSA_set_ex_data(), RSA_get_ex_data(), 124RSA_set_app_data() and RSA_get_app_data() were deprecated in OpenSSL 3.0. 125 126=head1 COPYRIGHT 127 128Copyright 2015-2021 The OpenSSL Project Authors. All Rights Reserved. 129 130Licensed under the Apache License 2.0 (the "License"). You may not use 131this file except in compliance with the License. You can obtain a copy 132in the file LICENSE in the source distribution or at 133L<https://www.openssl.org/source/license.html>. 134 135=cut 136