openconnect: add an option to support stoken

Add a new build configuration option for openconnect and let it link
against libstoken if instructed to. Two new uci configuration variables
are introduced: "token_mode" and "token_secret" to allow openconnect to
use those.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
This commit is contained in:
Florian Fainelli
2014-12-04 22:51:45 -08:00
parent ebd0c44052
commit a54d31ed3f
4 changed files with 18 additions and 4 deletions
+4 -1
View File
@@ -17,7 +17,7 @@ proto_openconnect_init_config() {
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
@@ -57,6 +57,9 @@ proto_openconnect_setup() {
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'"