aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/globals.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/globals.hh')
-rw-r--r--src/libstore/globals.hh15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index 93086eaf8..95f6b5e35 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -64,6 +64,8 @@ class Settings : public Config {
bool isWSL1();
+ Path getDefaultSSLCertFile();
+
public:
Settings();
@@ -826,8 +828,17 @@ public:
> `.netrc`.
)"};
- /* Path to the SSL CA file used */
- Path caFile;
+ Setting<Path> caFile{
+ this, getDefaultSSLCertFile(), "ssl-cert-file",
+ R"(
+ The path of a file containing CA certificates used to
+ authenticate `https://` downloads. It defaults to the first
+ of `/etc/ssl/certs/ca-certificates.crt` and
+ `/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt`
+ that exists. It can be overriden using the
+ `NIX_SSL_CERT_FILE` and `SSL_CERT_FILE` environment variable
+ (in that order of precedence).
+ )"};
#if __linux__
Setting<bool> filterSyscalls{