Skip to content

Commit

Permalink
gnutls: enable p11-kit by default
Browse files Browse the repository at this point in the history
GnuTLS has a single hard-coded location for the system trust store,
currently set to the path used by NixOS, Debian, Arch, Gentoo, etc.
Since not all distributions use the same path, notably Fedora and RHEL,
the certificate validation will break on some non-NixOS system.

This can be solved by enabling the p11-kit integration, so that by
default p11-kit (properly configured for all major distos) will provide
GnuTLS with the CA roots though the PKCS #11 API.
  • Loading branch information
rnhmjoj committed Nov 18, 2021
1 parent cf3013b commit 6f3b6a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/development/libraries/gnutls/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ stdenv.mkDerivation rec {

preConfigure = "patchShebangs .";
configureFlags =
lib.optional stdenv.isLinux "--with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt"
++ [
lib.optionals stdenv.isLinux [
"--with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt"
"--with-default-trust-store-pkcs11=pkcs11:"
] ++ [
"--disable-dependency-tracking"
"--enable-fast-install"
"--with-unbound-root-key-file=${dns-root-data}/root.key"
Expand Down

0 comments on commit 6f3b6a2

Please sign in to comment.