BIO_get_ex_new_index.pod 5.4 KB

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