PKG_NAME:=openconnect
PKG_VERSION:=7.00
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/
define Package/openconnect
SECTION:=net
CATEGORY:=Network
- DEPENDS:=+libxml2 +kmod-tun +resolveip +OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_GNUTLS:libgnutls
+ DEPENDS:=+libxml2 +kmod-tun +resolveip +OPENCONNECT_OPENSSL:libopenssl +OPENCONNECT_GNUTLS:libgnutls +OPENCONNECT_STOKEN:libstoken
TITLE:=OpenConnect VPN client (Cisco AnyConnect compatible)
MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
URL:=http://www.infradead.org/openconnect/
CONFIGURE_ARGS += \
--disable-shared \
--with-vpnc-script=/lib/netifd/vpnc-script \
- --without-libpcsclite
+ --without-libpcsclite \
+ --without-stoken
ifeq ($(CONFIG_OPENCONNECT_OPENSSL),y)
CONFIGURE_ARGS += \
--without-gnutls
endif
+ifeq ($(CONFIG_OPENCONNECT_STOKEN),y)
+CONFIGURE_ARGS += \
+ --with-stoken
+endif
+
define Package/openconnect/install
$(INSTALL_DIR) $(1)/etc/openconnect/
$(INSTALL_DIR) $(1)/lib/netifd/proto
option username 'test'
option password 'secret'
option serverhash 'AE7FF6A0426F0A0CD0A02EB9EC3C5066FAEB0B25'
+ option token_mode 'rsa' # when built with stoken support
+ option token_secret 'secret' # when built with stoken support
The additional files are also used:
/etc/openconnect/user-cert-vpn-MYVPN.pem: The user certificate
proto_openconnect_setup() {
local config="$1"
- json_get_vars server port username serverhash authgroup password vgroup
+ json_get_vars server port username serverhash authgroup password vgroup token_mode token_secret
grep -q tun /proc/modules || insmod tun
append cmdline "--passwd-on-stdin"
}
+ [ -n "$token_mode" ] && append cmdline "--token-mode=$token_mode"
+ [ -n "$token_secret" ] && append cmdline "--token-secret=$token_secret"
+
proto_export INTERFACE="$config"
logger -t openconnect "executing 'openconnect $cmdline'"