BIO_get_ex_new_index.pod 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. ECDH_get_ex_new_index, ECDH_set_ex_data, ECDH_get_ex_data,
  8. EC_KEY_get_ex_new_index, EC_KEY_set_ex_data, EC_KEY_get_ex_data,
  9. ENGINE_get_ex_new_index, ENGINE_set_ex_data, ENGINE_get_ex_data,
  10. EVP_PKEY_get_ex_new_index, EVP_PKEY_set_ex_data, EVP_PKEY_get_ex_data,
  11. RAND_DRBG_set_ex_data, RAND_DRBG_get_ex_data, RAND_DRBG_get_ex_new_index,
  12. RSA_get_ex_new_index, RSA_set_ex_data, RSA_get_ex_data,
  13. RSA_set_app_data, RSA_get_app_data,
  14. SSL_get_ex_new_index, SSL_set_ex_data, SSL_get_ex_data,
  15. SSL_set_app_data, SSL_get_app_data,
  16. SSL_CTX_get_ex_new_index, SSL_CTX_set_ex_data, SSL_CTX_get_ex_data,
  17. SSL_CTX_set_app_data, SSL_CTX_get_app_data,
  18. SSL_SESSION_get_ex_new_index, SSL_SESSION_set_ex_data, SSL_SESSION_get_ex_data,
  19. SSL_SESSION_set_app_data, SSL_SESSION_get_app_data,
  20. UI_get_ex_new_index, UI_set_ex_data, UI_get_ex_data,
  21. UI_set_app_data, UI_get_app_data,
  22. X509_STORE_CTX_get_ex_new_index, X509_STORE_CTX_set_ex_data, X509_STORE_CTX_get_ex_data,
  23. X509_STORE_CTX_set_app_data, X509_STORE_CTX_get_app_data,
  24. X509_STORE_get_ex_new_index, X509_STORE_set_ex_data, X509_STORE_get_ex_data,
  25. X509_get_ex_new_index, X509_set_ex_data, X509_get_ex_data
  26. - application-specific data
  27. =head1 SYNOPSIS
  28. =for openssl generic
  29. #include <openssl/x509.h>
  30. int TYPE_get_ex_new_index(long argl, void *argp,
  31. CRYPTO_EX_new *new_func,
  32. CRYPTO_EX_dup *dup_func,
  33. CRYPTO_EX_free *free_func);
  34. int TYPE_set_ex_data(TYPE *d, int idx, void *arg);
  35. void *TYPE_get_ex_data(const TYPE *d, int idx);
  36. #define TYPE_set_app_data(TYPE *d, void *arg)
  37. #define TYPE_get_app_data(TYPE *d)
  38. =head1 DESCRIPTION
  39. In the description here, I<TYPE> is used a placeholder
  40. for any of the OpenSSL datatypes listed in
  41. L<CRYPTO_get_ex_new_index(3)>.
  42. These functions handle application-specific data for OpenSSL data
  43. structures.
  44. TYPE_get_ex_new_index() is a macro that calls CRYPTO_get_ex_new_index()
  45. with the correct B<index> value.
  46. TYPE_set_ex_data() is a function that calls CRYPTO_set_ex_data() with
  47. an offset into the opaque exdata part of the TYPE object.
  48. TYPE_get_ex_data() is a function that calls CRYPTO_get_ex_data() with
  49. an offset into the opaque exdata part of the TYPE object.
  50. For compatibility with previous releases, the exdata index of zero is
  51. reserved for "application data." There are two convenience functions for
  52. this.
  53. TYPE_set_app_data() is a macro that invokes TYPE_set_ex_data() with
  54. B<idx> set to zero.
  55. TYPE_get_app_data() is a macro that invokes TYPE_get_ex_data() with
  56. B<idx> set to zero.
  57. Note that these functions are not defined for the B<RAND_DRBG> type because
  58. there are no backward compatibility concerns.
  59. =head1 RETURN VALUES
  60. TYPE_get_ex_new_index() returns a new index on success or -1 on error.
  61. TYPE_set_ex_data() returns 1 on success or 0 on error.
  62. TYPE_get_ex_data() returns the application data or NULL if an error occurred.
  63. =head1 SEE ALSO
  64. L<CRYPTO_get_ex_new_index(3)>.
  65. =head1 COPYRIGHT
  66. Copyright 2015-2020 The OpenSSL Project Authors. All Rights Reserved.
  67. Licensed under the Apache License 2.0 (the "License"). You may not use
  68. this file except in compliance with the License. You can obtain a copy
  69. in the file LICENSE in the source distribution or at
  70. L<https://www.openssl.org/source/license.html>.
  71. =cut