1CURLINFO_TLS_SESSION(3)    curl_easy_getinfo options   CURLINFO_TLS_SESSION(3)
2
3
4

NAME

6       CURLINFO_TLS_SESSION - get TLS session info
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_TLS_SESSION,
12                                  struct curl_tlssessioninfo **session);
13

DESCRIPTION

15       This  option  has  been superseded by CURLINFO_TLS_SSL_PTR(3) which was
16       added in 7.48.0. The only reason you would use this option  instead  is
17       if you could be using a version of libcurl earlier than 7.48.0.
18
19       This  option  is  exactly the same as CURLINFO_TLS_SSL_PTR(3) except in
20       the case of OpenSSL. If the session backend  is  CURLSSLBACKEND_OPENSSL
21       the session internals pointer varies depending on the option:
22
23       CURLINFO_TLS_SESSION OpenSSL session internals is SSL_CTX *.
24
25       CURLINFO_TLS_SSL_PTR OpenSSL session internals is SSL *.
26
27       You  can  obtain  an  SSL_CTX pointer from an SSL pointer using OpenSSL
28       function SSL_get_SSL_CTX. Therefore unless you need compatibility  with
29       older  versions  of  libcurl use CURLINFO_TLS_SSL_PTR(3). Refer to that
30       document for more information.
31

PROTOCOLS

33       All TLS-based
34

EXAMPLE

36       CURL *curl = curl_easy_init();
37       if(curl) {
38         CURLcode res;
39         struct curl_tlssessioninfo *tls;
40         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
41         res = curl_easy_perform(curl);
42         curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &tls);
43         curl_easy_cleanup(curl);
44       }
45

AVAILABILITY

47       Added in 7.34.0, and supported OpenSSL, GnuTLS, NSS and gskit  only  up
48       until 7.48.0 was released.
49

RETURN VALUE

51       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
52       if not.
53

SEE ALSO

55       curl_easy_getinfo(3), curl_easy_setopt(3), CURLINFO_TLS_SSL_PTR(3),
56
57
58
59libcurl 7.66.0                   May 31, 2017          CURLINFO_TLS_SESSION(3)
Impressum