SSL_get_ex_data_X509_STORE_CTX_idx.pod 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. =pod
  2. =head1 NAME
  3. SSL_get_ex_data_X509_STORE_CTX_idx - get ex_data index to access SSL structure
  4. from X509_STORE_CTX
  5. =head1 SYNOPSIS
  6. #include <openssl/ssl.h>
  7. int SSL_get_ex_data_X509_STORE_CTX_idx(void);
  8. =head1 DESCRIPTION
  9. SSL_get_ex_data_X509_STORE_CTX_idx() returns the index number under which
  10. the pointer to the SSL object is stored into the X509_STORE_CTX object.
  11. =head1 NOTES
  12. Whenever a X509_STORE_CTX object is created for the verification of the
  13. peers certificate during a handshake, a pointer to the SSL object is
  14. stored into the X509_STORE_CTX object to identify the connection affected.
  15. To retrieve this pointer the X509_STORE_CTX_get_ex_data() function can
  16. be used with the correct index. This index is globally the same for all
  17. X509_STORE_CTX objects and can be retrieved using
  18. SSL_get_ex_data_X509_STORE_CTX_idx(). The index value is set when
  19. SSL_get_ex_data_X509_STORE_CTX_idx() is first called either by the application
  20. program directly or indirectly during other SSL setup functions or during
  21. the handshake.
  22. The value depends on other index values defined for X509_STORE_CTX objects
  23. before the SSL index is created.
  24. =head1 RETURN VALUES
  25. =over 4
  26. =item E<gt>=0
  27. The index value to access the pointer.
  28. =item E<lt>0
  29. An error occurred, check the error stack for a detailed error message.
  30. =back
  31. =head1 EXAMPLES
  32. The index returned from SSL_get_ex_data_X509_STORE_CTX_idx() allows to
  33. access the SSL object for the connection to be accessed during the
  34. verify_callback() when checking the peers certificate. Please check
  35. the example in L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>,
  36. =head1 SEE ALSO
  37. L<ssl(3)|ssl(3)>, L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>,
  38. L<CRYPTO_set_ex_data(3)|CRYPTO_set_ex_data(3)>
  39. =cut