summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2021-02-22 14:00:59 -0800
committerGitHub <noreply@github.com>2021-02-22 22:00:59 +0000
commit482a1a86be7149f88a957684f690223e366bdfba (patch)
tree9add3ec14569a1f229d19e0bf4d61661b333f100 /lib
parent73da7b6de68c6102ef024e794f9ccb2a9ac7cc1a (diff)
downloadspack-482a1a86be7149f88a957684f690223e366bdfba.tar.gz
spack-482a1a86be7149f88a957684f690223e366bdfba.tar.bz2
spack-482a1a86be7149f88a957684f690223e366bdfba.tar.xz
spack-482a1a86be7149f88a957684f690223e366bdfba.zip
respect -k/verify-ssl-false in _existing_url method (#21864)
Diffstat (limited to 'lib')
-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 28f1a87c17..ff41c759ea 100644
--- a/lib/spack/spack/fetch_strategy.py
+++ b/lib/spack/spack/fetch_strategy.py
@@ -326,6 +326,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