openconnect: add support for option --pfs
authorVladislav Grigoryev <vg.aetera@gmail.com>
Sat, 14 Oct 2023 09:25:34 +0000 (12:25 +0300)
committerNikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
Mon, 19 Feb 2024 12:28:47 +0000 (13:28 +0100)
Add support for the OpenConnect option `--pfs`.
Designed to require perfect forward secrecy.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
net/openconnect/Makefile
net/openconnect/files/openconnect.sh

index 6bf724eeb6b35e06cd504d140f3c1fd555522e3b..8050d84075a78f52ad0041838d6c6a41ad21d5df 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openconnect
 PKG_VERSION:=9.01
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/
index 37f1945f41c7a6d8f1364049ceb7e0007196e27d..cab1a1de9d18c7c593cc2921a2ecd7feff51ac85 100755 (executable)
@@ -16,6 +16,7 @@ proto_openconnect_init_config() {
        proto_config_add_int "mtu"
        proto_config_add_int "juniper"
        proto_config_add_string "vpn_protocol"
+       proto_config_add_boolean "pfs"
        proto_config_add_boolean "no_dtls"
        proto_config_add_string "interface"
        proto_config_add_string "username"
@@ -53,6 +54,7 @@ proto_openconnect_setup() {
                os \
                password \
                password2 \
+               pfs \
                port \
                server \
                serverhash \
@@ -76,6 +78,7 @@ proto_openconnect_setup() {
        [ -n "$port" ] && port=":$port"
 
        append_args "$server$port" -i "$ifname" --non-inter --syslog --script /lib/netifd/vpnc-script
+       [ "$pfs" = 1 ] && append_args --pfs
        [ "$no_dtls" = 1 ] && append_args --no-dtls
        [ -n "$mtu" ] && append_args --mtu "$mtu"