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