Commit Graph

14 Commits

Author SHA1 Message Date
Philip Prindeville d279a64df8 strongswan: add priority option
Also from Vincent Wiemann <vincent.wiemann@ironai.com>.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-06-27 16:45:43 -06:00
Philip Prindeville 6c79715676 strongswan: add ipcomp support
Also from Vincent Wiemann <vincent.wiemann@ironai.com>.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-06-27 16:34:45 -06:00
Philip Prindeville 11ff072672 strongswan: add interface option for children
This option sets the interface of the policy.

Also from Vincent Wiemann <vincent.wiemann@ironai.com>.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-06-27 16:31:31 -06:00
Philip Prindeville 0231e043b7 strongswan: add support for hw_offload
Also from Vincent Wiemann <vincent.wiemann@ironai.com>.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-06-27 16:31:31 -06:00
Philip Prindeville 0fe23b0e4a strongswan: miscellaneous cleanup of config file, etc
Use list's where appropriate for multi-value config variables.

Forbid absolute/relative paths for certificate and key files.

Get rid of last remnants of left/right naming.

Factor invariant code paths.

Drop redundant secrets.rsa.filename section.

Thanks to Vincent Wiemann <vincent.wiemann@ironai.com> for calling
out many of these improvements.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-06-27 16:31:31 -06:00
Philip Prindeville 09dcf7486d strongswan: rename config functions
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-06-27 16:31:31 -06:00
Vincent Wiemann 59732ba018 strongswan: fix PSK config generation
There were closing curly braces missing and it was checking for empty
strings while it should have been checking for non-empty strings.

Signed-off-by: Vincent Wiemann <vincent.wiemann@ironai.com>
2021-06-18 04:42:01 +02:00
Philip Prindeville 2ccd2665cb strongswan: fix sharing of ipsec section variables
Variables set in config_ipsec() need to be shared with do_postamble()
function, so change scoping to parent (prepare_env()).

Also, remove unused settings like "remote_sourceip", "reqid", and
"packet_marker".

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-06-17 09:46:55 -06:00
Philip Prindeville a783986cbc strongswan: start charon directly from swanctl
ipsec uses starter, and reads /etc/ipsec.conf (which then includes
/var/ipsec/ipsec.conf, etc). This is overly complicated, and can
be problematic if you're using both swanctl and ipsec for migration.

Running charon directly from procd via the init.d script avoid
all of this.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-06-02 00:23:54 -06:00
Philip Prindeville ba79998e52 strongswan: swanctl init script doesn't load connections
Fixes issue #15446

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-05-05 11:58:34 -06:00
Philip Prindeville ff33f4ccd3 strongswan: handle chacha20poly1305 as AEAD
chacha20policy1305 is also an AEAD cipher, and hence does not
permit a hash algorithm.

Fixes issue #15397.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-04-13 12:46:07 -06:00
Philip Prindeville c95fd69973 strongswan: fail on serious configuration errors
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-04-13 12:46:07 -06:00
Philip Prindeville 210640d606 strongswan: drop subshell when possible
A subshell caused by $(...) can't persistently modify globals as a
side-effect.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-04-13 12:45:57 -06:00
Philip Prindeville f9d91f1f47 strongswan: migrate to swanctl configs
Derived from the ipsec initd script, with the following changes:

(1) various code improvements, corrections (get rid of left/right
    updown scripts, since there's only one), etc;
(2) add reauth and fragmentation parameters;
(3) add x.509 certificate-based authentication;

and other minor changes.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2021-04-04 11:58:51 -06:00