about summary refs log tree commit diff
path: root/pkgs/build-support/fetchurl
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-01-02 13:01:17 +0100
committerGitHub <noreply@github.com>2022-01-02 13:01:17 +0100
commit5f58402c9462eb6fea52a053e2d21961757932a1 (patch)
treed4baa6d371597de37a4187904b62ca50e4bc03af /pkgs/build-support/fetchurl
parent00a5cfc30655e5263b7f5da0ff19122acefbc941 (diff)
fetchurl: also check certificate when using all zero hash (#152608)
Diffstat (limited to 'pkgs/build-support/fetchurl')
-rw-r--r--pkgs/build-support/fetchurl/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix
index 8ce69a7f1878b..72af03e03d984 100644
--- a/pkgs/build-support/fetchurl/default.nix
+++ b/pkgs/build-support/fetchurl/default.nix
@@ -139,7 +139,7 @@ stdenvNoCC.mkDerivation {
   # New-style output content requirements.
   inherit (hash_) outputHashAlgo outputHash;
 
-  SSL_CERT_FILE = if hash_.outputHash == ""
+  SSL_CERT_FILE = if (hash_.outputHash == "" || hash_.outputHash == lib.fakeSha256 || hash_.outputHash == lib.fakeSha512 || hash_.outputHash == lib.fakeHash)
                   then "${cacert}/etc/ssl/certs/ca-bundle.crt"
                   else "/no-cert-file.crt";