To match the actually-parsed parameters in tests/fake-gp-server.py, change
'gateway_2fa' → 'gw_2fa'.
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
# Get parameters into the initial session setup in order to configure:
# gateways: list of gateway names for portal to offer (all will point to same HOST:PORT as portal)
# portal_2fa: if set, require challenge-based 2FA to complete /global-protect/getconfig.esp request
-# gateway_2fa: if set, require challenge-based 2FA to complete /ssl-vpn/login.esp request
+# gw_2fa: if set, require challenge-based 2FA to complete /ssl-vpn/login.esp request
# portal_saml: set to 'portal-userauthcookie' or 'prelogin-cookie' to require SAML on portal (and
# expect the named cookie to be provided to signal SAML completion)
# gateway_saml: likewise, set to require SAML on gateway
echo ok
echo -n "Authenticating with username/password/token via portal, then using portal-userauthcookie to continue through gateway... "
-( echo "test" | LD_PRELOAD=libsocket_wrapper.so $OPENCONNECT --protocol=gp -q "$ADDRESS:443/global-protect/testconfig.esp?portal_2fa=1&gateway_2fa=1&portal_cookie=portal-userauthcookie" -u test --token-mode=totp --token-secret=FAKE $FINGERPRINT --cookieonly >/dev/null 2>&1) ||
+( echo "test" | LD_PRELOAD=libsocket_wrapper.so $OPENCONNECT --protocol=gp -q "$ADDRESS:443/global-protect/testconfig.esp?portal_2fa=1&gw_2fa=1&portal_cookie=portal-userauthcookie" -u test --token-mode=totp --token-secret=FAKE $FINGERPRINT --cookieonly >/dev/null 2>&1) ||
fail $PID "Could not receive cookie from fake GlobalProtect server"
echo ok