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