From 649756b3a2648ca4bb6a713762f4606e0e788f51 Mon Sep 17 00:00:00 2001 From: vl Date: Fri, 18 Feb 2011 09:44:40 +0100 Subject: [PATCH] Fixed: lookup the cert file --- code/ryzom/client/src/http_client_curl.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/http_client_curl.cpp b/code/ryzom/client/src/http_client_curl.cpp index 85b8f4ee7..1ee155156 100644 --- a/code/ryzom/client/src/http_client_curl.cpp +++ b/code/ryzom/client/src/http_client_curl.cpp @@ -57,7 +57,7 @@ bool CCurlHttpClient::authenticate(const std::string &user, const std::string &p return true; } -const char *CAFilename = "./data/ssl_ca_cert.pem"; // this the certificate "Thawte Server CA" +const char *CAFilename = "ssl_ca_cert.pem"; // this the certificate "Thawte Server CA" // *************************************************************************** bool CCurlHttpClient::verifyServer(bool verify) @@ -66,7 +66,9 @@ bool CCurlHttpClient::verifyServer(bool verify) curl_easy_setopt(_Curl, CURLOPT_SSL_VERIFYPEER, verify ? 1 : 0); curl_easy_setopt(_Curl, CURLOPT_SSLCERTTYPE, "PEM"); //curl_easy_setopt(_Curl, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function); // would allow to provide the CA in memory instead of using CURLOPT_CAINFO, but needs to include and link OpenSSL - curl_easy_setopt(_Curl, CURLOPT_CAINFO, CAFilename); + string path = CPath::lookup(CAFilename); + nldebug("cert path '%s'", path.c_str()); + curl_easy_setopt(_Curl, CURLOPT_CAINFO, path.c_str()); curl_easy_setopt(_Curl, CURLOPT_CAPATH, NULL); return true; }