summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2021-02-22 14:00:59 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2021-05-10 23:11:29 -0700
commit8c05387ebcda7a556c24896d23795bd534f4f8b4 (patch)
treefde24dff07e21a57acb465e0c01498ca45bfcd80
parent393a105c067f4358b3e3e9663f920ee430b627c4 (diff)
downloadspack-8c05387ebcda7a556c24896d23795bd534f4f8b4.tar.gz
spack-8c05387ebcda7a556c24896d23795bd534f4f8b4.tar.bz2
spack-8c05387ebcda7a556c24896d23795bd534f4f8b4.tar.xz
spack-8c05387ebcda7a556c24896d23795bd534f4f8b4.zip
respect -k/verify-ssl-false in _existing_url method (#21864)
-rw-r--r--lib/spack/spack/fetch_strategy.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/spack/spack/fetch_strategy.py b/lib/spack/spack/fetch_strategy.py
index f075b893ae..1b94206fbf 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -324,6 +324,8 @@ class URLFetchStrategy(FetchStrategy):
# Telling curl to fetch the first byte (-r 0-0) is supposed to be
# portable.
curl_args = ['--stderr', '-', '-s', '-f', '-r', '0-0', url]
+ if not spack.config.get('config:verify_ssl'):
+ curl_args.append('-k')
_ = curl(*curl_args, fail_on_error=False, output=os.devnull)
return curl.returncode == 0