Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cacerts with spaces #615

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions modules/security/pki/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ let
blacklist = cfg.caCertificateBlacklist;
};

caCertificates = pkgs.runCommand "ca-certificates.crt"
{ files =
cfg.certificateFiles ++
[ (builtins.toFile "extra.crt" (concatStringsSep "\n" cfg.certificates)) ];
}
caCertificates = pkgs.runCommand "ca-certificates.crt" {}
''
cat $files > $out
cat ${escapeShellArgs (
cfg.certificateFiles ++
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not able to be kept in the env vars section of pkgs.runCommand, because cat still sees it as a single argument

[ (builtins.toFile "extra.crt" (concatStringsSep "\n" cfg.certificates)) ]
)} > $out
'';
in

Expand Down
Loading