stdenv, cacert: consider $NIX_SSL_CERT_FILE in hooks
Some SSL libs don't react to $SSL_CERT_FILE. That actually makes sense to me, as we add this behavior as nixpkgs-specific, so it seems "safer" to use $NIX_*.
This commit is contained in:
@@ -646,9 +646,12 @@ fi
|
||||
export NIX_BUILD_CORES
|
||||
|
||||
|
||||
# Prevent OpenSSL-based applications from using certificates in
|
||||
# /etc/ssl.
|
||||
# Prevent SSL libraries from using certificates in /etc/ssl, unless set explicitly.
|
||||
# Leave it in shells for convenience.
|
||||
if [ -z "${NIX_SSL_CERT_FILE:-}" ] && [ -z "${IN_NIX_SHELL:-}" ]; then
|
||||
export NIX_SSL_CERT_FILE=/no-cert-file.crt
|
||||
fi
|
||||
# Another variant left for compatibility.
|
||||
if [ -z "${SSL_CERT_FILE:-}" ] && [ -z "${IN_NIX_SHELL:-}" ]; then
|
||||
export SSL_CERT_FILE=/no-cert-file.crt
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user