1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

Merge pull request #14346 from NixOS/remove-verify-tls

libstore/filetransfer: Remove verifyTLS from FileTransferRequest, sin…
This commit is contained in:
Sergei Zimmerman 2025-10-24 10:48:43 +00:00 committed by GitHub
commit 925c0fa4a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 8 deletions

View file

@ -401,13 +401,8 @@ struct curlFileTransfer : public FileTransfer
curl_easy_setopt(req, CURLOPT_SEEKDATA, this); curl_easy_setopt(req, CURLOPT_SEEKDATA, this);
} }
if (request.verifyTLS) { if (settings.caFile != "")
if (settings.caFile != "") curl_easy_setopt(req, CURLOPT_CAINFO, settings.caFile.get().c_str());
curl_easy_setopt(req, CURLOPT_CAINFO, settings.caFile.get().c_str());
} else {
curl_easy_setopt(req, CURLOPT_SSL_VERIFYPEER, 0);
curl_easy_setopt(req, CURLOPT_SSL_VERIFYHOST, 0);
}
#if !defined(_WIN32) && LIBCURL_VERSION_NUM >= 0x071000 #if !defined(_WIN32) && LIBCURL_VERSION_NUM >= 0x071000
curl_easy_setopt(req, CURLOPT_SOCKOPTFUNCTION, cloexec_callback); curl_easy_setopt(req, CURLOPT_SOCKOPTFUNCTION, cloexec_callback);

View file

@ -99,7 +99,6 @@ struct FileTransferRequest
VerbatimURL uri; VerbatimURL uri;
Headers headers; Headers headers;
std::string expectedETag; std::string expectedETag;
bool verifyTLS = true;
bool head = false; bool head = false;
bool post = false; bool post = false;
size_t tries = fileTransferSettings.tries; size_t tries = fileTransferSettings.tries;