fetchurl: also check certificate when using all zero hash (#152608)

This commit is contained in:
Sandro 2022-01-02 13:01:17 +01:00 committed by GitHub
parent 00a5cfc306
commit 5f58402c94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,7 +139,7 @@ stdenvNoCC.mkDerivation {
# New-style output content requirements. # New-style output content requirements.
inherit (hash_) outputHashAlgo outputHash; 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" then "${cacert}/etc/ssl/certs/ca-bundle.crt"
else "/no-cert-file.crt"; else "/no-cert-file.crt";