Fixed: Compilation with older CURL

--HG--
branch : develop
This commit is contained in:
kervala 2018-08-07 18:41:04 +02:00
parent d9e6d34fcc
commit 6966bc1a12

View file

@ -69,7 +69,16 @@ namespace NLGUI
// get more information on CURL session
curl_tlssessioninfo *sessionInfo;
CURLcode res = curl_easy_getinfo(curl, CURLINFO_TLS_SSL_PTR, &sessionInfo);
CURLINFO info;
#if CURL_AT_LEAST_VERSION(7, 48, 0)
info = CURLINFO_TLS_SSL_PTR;
#else
info = CURLINFO_TLS_SESSION;
#endif
CURLcode res = curl_easy_getinfo(curl, info, &sessionInfo);
// only use OpenSSL callback if not using Windows SSPI and using OpenSSL backend
if (!res && sessionInfo && sessionInfo->backend == CURLSSLBACKEND_OPENSSL && !(data && data->features & CURL_VERSION_SSPI))