summaryrefslogtreecommitdiff
path: root/lib/getinfo.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-07-31 12:19:51 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-07-31 12:19:51 +0200
commita439e438f3662f12c003bda3c8cc3f6de09b4da0 (patch)
tree953d5cb7766efbcc4e63f47caa420a9e4a303a41 /lib/getinfo.c
parent028a408d57cfcc891b9b88f1d56bc130980e11d0 (diff)
downloadcurl-a439e438f3662f12c003bda3c8cc3f6de09b4da0.tar.gz
ssl: generalize how the ssl backend identifier is set
Each backend now defines CURL_SSL_BACKEND accordingly. Added the *AXTLS one which was missing previously.
Diffstat (limited to 'lib/getinfo.c')
-rw-r--r--lib/getinfo.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/getinfo.c b/lib/getinfo.c
index bbda35dd0..8905d3613 100644
--- a/lib/getinfo.c
+++ b/lib/getinfo.c
@@ -285,6 +285,7 @@ static CURLcode getinfo_slist(struct SessionHandle *data, CURLINFO info,
struct curl_tlssessioninfo *tsi = &data->tsi;
struct connectdata *conn = data->easy_conn;
unsigned int sockindex = 0;
+ void *internals = NULL;
*tsip = tsi;
tsi->backend = CURLSSLBACKEND_NONE;
@@ -303,25 +304,24 @@ static CURLcode getinfo_slist(struct SessionHandle *data, CURLINFO info,
/* Return the TLS session information from the relevant backend */
#ifdef USE_SSLEAY
- tsi->backend = CURLSSLBACKEND_OPENSSL;
- tsi->internals = conn->ssl[sockindex].ctx;
+ internals = conn->ssl[sockindex].ctx;
#endif
#ifdef USE_GNUTLS
- tsi->backend = CURLSSLBACKEND_GNUTLS;
- tsi->internals = conn->ssl[sockindex].session;
+ internals = conn->ssl[sockindex].session;
#endif
#ifdef USE_NSS
- tsi->backend = CURLSSLBACKEND_NSS;
- tsi->internals = conn->ssl[sockindex].handle;
+ internals = conn->ssl[sockindex].handle;
#endif
#ifdef USE_QSOSSL
- tsi->backend = CURLSSLBACKEND_QSOSSL;
- tsi->internals = conn->ssl[sockindex].handle;
+ internals = conn->ssl[sockindex].handle;
#endif
#ifdef USE_GSKIT
- tsi->backend = CURLSSLBACKEND_GSKIT;
- tsi->internals = conn->ssl[sockindex].handle;
+ internals = conn->ssl[sockindex].handle;
#endif
+ if(internals) {
+ tsi->backend = Curl_ssl_backend();
+ tsi->internals = internals;
+ }
/* 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
backend as CURLSSLBACKEND_NONE in those cases, which should be