openconnect: add support for option --pfs

Add support for the OpenConnect option `--pfs`.
Designed to require perfect forward secrecy.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
This commit is contained in:
Vladislav Grigoryev 2023-10-14 12:25:34 +03:00 committed by Nikos Mavrogiannopoulos
parent c2515de900
commit 463b115966
2 changed files with 4 additions and 1 deletions

View 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/

View File

@ -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"