diff options
author | Steve Holme <steve_holme@hotmail.com> | 2013-11-30 10:59:01 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-11-30 11:08:56 +0000 |
commit | dc68120e6352cc2516bf25758f3aae71400b9702 (patch) | |
tree | d3b66b009f2d252779058a35293730b8b234e8d6 /lib/getinfo.c | |
parent | 0db811b69b2d5a18f8122d94db4e520909fd992b (diff) | |
download | curl-dc68120e6352cc2516bf25758f3aae71400b9702.tar.gz |
curl_easy_getinfo: Post CURLINFO_TLS_SESSION tidy up
1) Renamed curl_tlsinfo to curl_tlssessioninfo as discussed on the
mailing list.
2) Renamed curl_ssl_backend to curl_sslbackend so it doesn't follow our
function naming convention.
3) Updated sessioninfo.c example accordingly.
Diffstat (limited to 'lib/getinfo.c')
-rw-r--r-- | lib/getinfo.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/lib/getinfo.c b/lib/getinfo.c index cd5a62ac0..c5c00e048 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -279,14 +279,15 @@ static CURLcode getinfo_slist(struct SessionHandle *data, CURLINFO info, break; case CURLINFO_TLS_SESSION: { - struct curl_tlsinfo **tlsinfop = (struct curl_tlsinfo **) param_slistp; - struct curl_tlsinfo *tlsinfo = &data->tlsinfo; + struct curl_tlssessioninfo **tsip = (struct curl_tlssessioninfo **) + param_slistp; + struct curl_tlssessioninfo *tsi = &data->tsi; struct connectdata *conn = data->easy_conn; unsigned int sockindex = 0; - *tlsinfop = tlsinfo; - tlsinfo->ssl_backend = CURLSSLBACKEND_NONE; - tlsinfo->internals = NULL; + *tsip = tsi; + tsi->backend = CURLSSLBACKEND_NONE; + tsi->internals = NULL; if(!conn) break; @@ -301,24 +302,24 @@ static CURLcode getinfo_slist(struct SessionHandle *data, CURLINFO info, /* Return the TLS session information from the relevant backend */ #ifdef USE_SSLEAY - tlsinfo->ssl_backend = CURLSSLBACKEND_OPENSSL; - tlsinfo->internals = conn->ssl[sockindex].ctx; + tsi->backend = CURLSSLBACKEND_OPENSSL; + tsi->internals = conn->ssl[sockindex].ctx; #endif #ifdef USE_GNUTLS - tlsinfo->ssl_backend = CURLSSLBACKEND_GNUTLS; - tlsinfo->internals = conn->ssl[sockindex].session; + tsi->backend = CURLSSLBACKEND_GNUTLS; + tsi->internals = conn->ssl[sockindex].session; #endif #ifdef USE_NSS - tlsinfo->ssl_backend = CURLSSLBACKEND_NSS; - tlsinfo->internals = conn->ssl[sockindex].handle; + tsi->backend = CURLSSLBACKEND_NSS; + tsi->internals = conn->ssl[sockindex].handle; #endif #ifdef USE_QSOSSL - tlsinfo->ssl_backend = CURLSSLBACKEND_QSOSSL; - tlsinfo->internals = conn->ssl[sockindex].handle; + tsi->backend = CURLSSLBACKEND_QSOSSL; + tsi->internals = conn->ssl[sockindex].handle; #endif #ifdef USE_GSKIT - tlsinfo->ssl_backend = CURLSSLBACKEND_GSKIT; - tlsinfo->internals = conn->ssl[sockindex].handle; + tsi->backend = CURLSSLBACKEND_GSKIT; + tsi->internals = conn->ssl[sockindex].handle; #endif /* NOTE: For other SSL backends, it is not immediately clear what data to return from 'struct ssl_connect_data'; thus, for now we keep the |