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

strongswan: set the right dir for TLS CA cert #46397

Merged
merged 1 commit into from Sep 9, 2018

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Sep 8, 2018

Motivation for this change

This fixes an issue where the strongswan NM client is not able to
connect to a VPN. By default it tries to load the trust CA from
/usr/share/ca-certificates which doesn't exist in NixOS and most modern
distros.

See debian-related issue:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835095

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

Since playing around with this I am having issues with the error: Could not activate connection: The VPN service 'org.freedesktop.NetworkManager.strongswan' was not installed.. Even when reverting back to nixos-unstable. I think that there is some state file somewhere that locks the version.

This fixes an issue where the strongswan NM client is not able to
connect to a VPN. By default it tries to load the trust CA from
/usr/share/ca-certificates which doesn't exist in NixOS and most modern
distros.

See debian-related issue:
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835095
@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: strongswan

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: strongswan

Partial log (click to expand)

these paths will be fetched (2.38 MiB download, 10.30 MiB unpacked):
  /nix/store/0ljcqnb2ds82h1523w13jdlw209arcrv-openssl-1.1.0i
  /nix/store/mm4p2b4yqcx1djkr924ciab2vhzihxri-ldns-1.7.0
  /nix/store/yyxiw815qbkrzss91dfnrb07mj017pvd-strongswan-5.6.3
copying path '/nix/store/0ljcqnb2ds82h1523w13jdlw209arcrv-openssl-1.1.0i' from 'https://cache.nixos.org'...
copying path '/nix/store/mm4p2b4yqcx1djkr924ciab2vhzihxri-ldns-1.7.0' from 'https://cache.nixos.org'...
copying path '/nix/store/yyxiw815qbkrzss91dfnrb07mj017pvd-strongswan-5.6.3' from 'https://cache.nixos.org'...
/nix/store/yyxiw815qbkrzss91dfnrb07mj017pvd-strongswan-5.6.3

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: strongswan

Partial log (click to expand)

  /nix/store/ckhmn42gnzsmxf6kplnhxvjs171s2hly-ldns-1.7.0
  /nix/store/gj5qw8c2ji9cpa600gf1yxwcf3k89v98-openssl-1.1.0i
  /nix/store/z24g4kb9nllib9hbi8j13j6ifblvsjib-pcsclite-1.8.23
copying path '/nix/store/6rnjva0v7diwwn747ccbvmglib1dqgv8-openresolv-3.9.0' from 'https://cache.nixos.org'...
copying path '/nix/store/gj5qw8c2ji9cpa600gf1yxwcf3k89v98-openssl-1.1.0i' from 'https://cache.nixos.org'...
copying path '/nix/store/0jb9hwr54c7pwzy0hn2mbmfd76lj1msj-pcsclite-1.8.23-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/ckhmn42gnzsmxf6kplnhxvjs171s2hly-ldns-1.7.0' from 'https://cache.nixos.org'...
copying path '/nix/store/z24g4kb9nllib9hbi8j13j6ifblvsjib-pcsclite-1.8.23' from 'https://cache.nixos.org'...
copying path '/nix/store/7kg61ssbxfnqws8smp81k87ld1ir9i71-strongswan-5.6.3' from 'https://cache.nixos.org'...
/nix/store/7kg61ssbxfnqws8smp81k87ld1ir9i71-strongswan-5.6.3

@Mic92 Mic92 merged commit 6b1e587 into NixOS:master Sep 9, 2018
@Mic92
Copy link
Member

Mic92 commented Sep 9, 2018

backport:

[detached HEAD 6142a2e] strongswan: set the right dir for TLS CA cert
Author: zimbatm zimbatm@zimbatm.com
Date: Thu Sep 6 15:17:52 2018 +0100
1 file changed, 4 insertions(+), 1 deletion(-)

@zimbatm zimbatm deleted the strongswan-fix-nm-ca-dir branch September 9, 2018 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants