strongswan: Add support for send_cert option
authorMartin Pecka <peci1@seznam.cz>
Sun, 7 Jan 2024 22:00:07 +0000 (23:00 +0100)
committerPhilip Prindeville <philipp@redfish-solutions.com>
Tue, 19 Nov 2024 16:05:33 +0000 (08:05 -0800)
This option is required by some clients, e.g. iOS.

Signed-off-by: Martin Pecka <peci1@seznam.cz>
net/strongswan/files/swanctl.init

index 2469001595cd4d2c69df2f00123d4d124efe3c9b..b081f776f0771b33ed29d7f7ab8f62b0395ed1e4 100644 (file)
@@ -466,6 +466,7 @@ config_remote() {
        config_get ca_cert "$conf" ca_cert ""
        config_get rekeytime "$conf" rekeytime
        config_get overtime "$conf" overtime
+       config_get send_cert "$conf" send_cert
 
        config_list_foreach "$conf" local_sourceip append_var local_sourceip ","
        config_list_foreach "$conf" remote_ca_certs append_var remote_ca_certs ","
@@ -560,6 +561,8 @@ config_remote() {
                ;;
        esac
 
+       [ -n "$send_cert" ] && swanctl_xappend2 "send_cert = $send_cert"
+
        [ $mobike -eq 1 ] && swanctl_xappend2 "mobike = yes" || swanctl_xappend2 "mobike = no"
 
        if [ -n "$rekeytime" ]; then