diff options
Diffstat (limited to 'Source/cmCurl.cxx')
-rw-r--r-- | Source/cmCurl.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmCurl.cxx b/Source/cmCurl.cxx index fa001d2..28ee24d 100644 --- a/Source/cmCurl.cxx +++ b/Source/cmCurl.cxx @@ -31,11 +31,11 @@ } \ } while (false) -std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile) +std::string cmCurlSetCAInfo(::CURL* curl, const std::string& cafile) { std::string e; - if (cafile && *cafile) { - ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile); + if (!cafile.empty()) { + ::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_CAINFO, cafile.c_str()); check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: "); } #ifdef CMAKE_FIND_CAFILE |