The Google 2FA support for Juniper was not working due to a minor typo
in `auth-juniper.c`.
When attempting to connect with --juniper --token-mode=totp
--token-secret=<XXX> the error:
Unknown form ID 'frmTotpToken'
would pop up along with some HTML dump.
I simply corrected the typo (ftmTotpToken -> frmTotpToken). `git am` to
apply patch.
Signed-off-by: Yage Hu <[email protected]>
From cffb3a8625cc015c2c637c6b3cbaa3f026a84de3 Mon Sep 17 00:00:00 2001
From: Yage Hu <[email protected]>
Date: Wed, 18 Apr 2018 17:44:11 -0700
Subject: [PATCH] Fix Google 2FA typo
Google 2FA fail would fail with `Unkown form ID 'frmTotpToken'`
---
auth-juniper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/auth-juniper.c b/auth-juniper.c
index eee85d2..acd9c77 100644
--- a/auth-juniper.c
+++ b/auth-juniper.c
@@ -77,7 +77,7 @@ static int oncp_can_gen_tokencode(struct openconnect_info *vpninfo,
if (strcmp(form->auth_id, "frmDefender") &&
strcmp(form->auth_id, "frmNextToken") &&
- strcmp(form->auth_id, "ftmTotpToken"))
+ strcmp(form->auth_id, "frmTotpToken"))
return -EINVAL;
return can_gen_tokencode(vpninfo, form, opt);
--
2.17.0
_______________________________________________
openconnect-devel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/openconnect-devel