mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
Merge pull request #654 from utdemir/more-insecure-verify-https-binary-caches
Also set CURLOPT_SSL_VERIFYHOST=0 when "verify-https-binary-caches" is false
This commit is contained in:
commit
bdc4a0b54d
1 changed files with 6 additions and 1 deletions
|
@ -80,7 +80,12 @@ sub addRequest {
|
|||
$curl->setopt(CURLOPT_WRITEDATA, $fh);
|
||||
$curl->setopt(CURLOPT_FOLLOWLOCATION, 1);
|
||||
$curl->setopt(CURLOPT_CAINFO, $caBundle) if defined $caBundle;
|
||||
$curl->setopt(CURLOPT_SSL_VERIFYPEER, 0) unless isTrue($Nix::Config::config{"verify-https-binary-caches"} // "1");
|
||||
|
||||
unless (isTrue($Nix::Config::config{"verify-https-binary-caches"} // "1")) {
|
||||
$curl->setopt(CURLOPT_SSL_VERIFYPEER, 0);
|
||||
$curl->setopt(CURLOPT_SSL_VERIFYHOST, 0);
|
||||
}
|
||||
|
||||
$curl->setopt(CURLOPT_USERAGENT, $userAgent);
|
||||
$curl->setopt(CURLOPT_NOBODY, 1) if $head;
|
||||
$curl->setopt(CURLOPT_FAILONERROR, 1);
|
||||
|
|
Loading…
Reference in a new issue