Skip to content

Commit

Permalink
Merge pull request #19 from nxxm/feature/change_CACERTS_path
Browse files Browse the repository at this point in the history
change cacerts path
  • Loading branch information
daminetreg authored Jan 17, 2024
2 parents 78eabef + 13b7cf7 commit 1f637a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .tipi/deps
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"u": true
}

, "nxxm/curl" : { "@" : ":eee4ae62ee24aec9c7f8948fd8670a5e80c2cf83"
, "nxxm/curl" : { "@" : ":6f0e7427d75d7b7462bb940c4ec8e46ee4214b25"
, "opts" : "set(BUILD_CURL_TESTS OFF) \nset(BUILD_CURL_EXE ON) \nset(CMAKE_USE_OPENSSL ON) \nset(CMAKE_USE_LIBSSH2 OFF) \nset(BUILD_TESTING OFF)"
, "u" : true
, "packages" : ["CURL"]
, "targets" : [ "CURL::libcurl" ]
, "requires" : {
"nxxm/boringssl" : { "@" : ":64b173d5c7acb7e8e270997418685d9a00f0537b",
"nxxm/boringssl" : { "@" : ":358175c062c3a3964d4734df4b122e6af851def0",
"u": true
, "packages" : ["OpenSSL"]
, "targets" : ["OpenSSL::SSL", "OpenSSL::Crypto"]
Expand Down
5 changes: 5 additions & 0 deletions xxhr/impl/session-curl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,11 @@ void Session::Impl::prepareCommon() {
curl_easy_setopt(curl_->handle, CURLOPT_CAINFO, "/etc/ssl/cert.pem");
#endif

if (std::getenv("SSL_CERT_FILE") != nullptr) {
std::string cacert_path = getenv("SSL_CERT_FILE");
curl_easy_setopt(curl_->handle, CURLOPT_CAINFO,cacert_path.data());
}

#if LIBCURL_VERSION_MAJOR >= 7
#if LIBCURL_VERSION_MINOR >= 71
// Fix loading certs from Windows cert store when using OpenSSL:
Expand Down

0 comments on commit 1f637a3

Please sign in to comment.