summary refs log tree commit diff
path: root/modules/security/ca.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2010-01-20 14:22:47 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2010-01-20 14:22:47 +0000
commit8a6346e4774910348fcbe149f2b2892556518bf5 (patch)
treee0c8f8228b132ce3fc13a1ae6fb7ec0e953c7271 /modules/security/ca.nix
parent6502806689113c1a12b944be2695664ea7e7f26a (diff)
downloadnixpkgs-8a6346e4774910348fcbe149f2b2892556518bf5.tar
nixpkgs-8a6346e4774910348fcbe149f2b2892556518bf5.tar.gz
nixpkgs-8a6346e4774910348fcbe149f2b2892556518bf5.tar.bz2
nixpkgs-8a6346e4774910348fcbe149f2b2892556518bf5.tar.lz
nixpkgs-8a6346e4774910348fcbe149f2b2892556518bf5.tar.xz
nixpkgs-8a6346e4774910348fcbe149f2b2892556518bf5.tar.zst
nixpkgs-8a6346e4774910348fcbe149f2b2892556518bf5.zip
* Provide a bundle of CA certificates in /etc/ca-bundle.crt, and set
  the CURL_CA_BUNDLE environment variable.  This allows curl to work
  without the `-k' flag on https sites with a properly signed
  certificate.

svn path=/nixos/trunk/; revision=19572
Diffstat (limited to 'modules/security/ca.nix')
-rw-r--r--modules/security/ca.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/security/ca.nix b/modules/security/ca.nix
new file mode 100644
index 00000000000..efa32f5e8f3
--- /dev/null
+++ b/modules/security/ca.nix
@@ -0,0 +1,21 @@
+{ config, pkgs, ... }:
+
+with pkgs.lib;
+
+{
+
+  config = {
+
+    environment.etc = singleton
+      { source = "${pkgs.cacert}/etc/ca-bundle.crt";
+        target = "ca-bundle.crt";
+      };
+
+    environment.shellInit =
+      ''
+        export CURL_CA_BUNDLE=/etc/ca-bundle.crt
+      '';
+      
+  };
+
+}