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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user