172613Skris=pod 272613Skris 372613Skris=head1 NAME 472613Skris 572613SkrisSSL_get_ex_data_X509_STORE_CTX_idx - get ex_data index to access SSL structure 672613Skrisfrom X509_STORE_CTX 772613Skris 872613Skris=head1 SYNOPSIS 972613Skris 1072613Skris #include <openssl/ssl.h> 1172613Skris 1272613Skris int SSL_get_ex_data_X509_STORE_CTX_idx(void); 1372613Skris 1472613Skris=head1 DESCRIPTION 1572613Skris 1672613SkrisSSL_get_ex_data_X509_STORE_CTX_idx() returns the index number under which 1772613Skristhe pointer to the SSL object is stored into the X509_STORE_CTX object. 1872613Skris 1972613Skris=head1 NOTES 2072613Skris 2172613SkrisWhenever a X509_STORE_CTX object is created for the verification of the 2272613Skrispeers certificate during a handshake, a pointer to the SSL object is 2372613Skrisstored into the X509_STORE_CTX object to identify the connection affected. 2472613SkrisTo retrieve this pointer the X509_STORE_CTX_get_ex_data() function can 2572613Skrisbe used with the correct index. This index is globally the same for all 2672613SkrisX509_STORE_CTX objects and can be retrieved using 2772613SkrisSSL_get_ex_data_X509_STORE_CTX_idx(). The index value is set when 2872613SkrisSSL_get_ex_data_X509_STORE_CTX_idx() is first called either by the application 2972613Skrisprogram directly or indirectly during other SSL setup functions or during 3072613Skristhe handshake. 3172613Skris 3272613SkrisThe value depends on other index values defined for X509_STORE_CTX objects 3372613Skrisbefore the SSL index is created. 3472613Skris 3572613Skris=head1 RETURN VALUES 3672613Skris 3772613Skris=over 4 3872613Skris 3972613Skris=item E<gt>=0 4072613Skris 4172613SkrisThe index value to access the pointer. 4272613Skris 4372613Skris=item E<lt>0 4472613Skris 4572613SkrisAn error occurred, check the error stack for a detailed error message. 4672613Skris 4772613Skris=back 4872613Skris 4972613Skris=head1 EXAMPLES 5072613Skris 5172613SkrisThe index returned from SSL_get_ex_data_X509_STORE_CTX_idx() allows to 5272613Skrisaccess the SSL object for the connection to be accessed during the 5372613Skrisverify_callback() when checking the peers certificate. Please check 5472613Skristhe example in L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>, 5572613Skris 5672613Skris=head1 SEE ALSO 5772613Skris 5872613SkrisL<ssl(3)|ssl(3)>, L<SSL_CTX_set_verify(3)|SSL_CTX_set_verify(3)>, 5972613SkrisL<CRYPTO_set_ex_data(3)|CRYPTO_set_ex_data(3)> 6072613Skris 6172613Skris=cut 62