Ensure stoken seed is properly prepared using block copied from Cisco
VPN support in auth.c

Signed-off-by: Andy Wang <do...@moonteeth.com>
---
 auth-juniper.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/auth-juniper.c b/auth-juniper.c
index 30ceb3ae..bc560823 100644
--- a/auth-juniper.c
+++ b/auth-juniper.c
@@ -576,6 +576,14 @@ int oncp_obtain_cookie(struct openconnect_info *vpninfo)
        char *form_id = NULL;
        int try_tncc = !!vpninfo->csd_wrapper;
 
+#ifdef HAVE_LIBSTOKEN
+        if (vpninfo->token_mode == OC_TOKEN_MODE_STOKEN) {
+                ret = prepare_stoken(vpninfo);
+                if (ret)
+                        goto out;
+        }
+#endif
+
        resp_buf = buf_alloc();
        if (buf_error(resp_buf))
                return -ENOMEM;
-- 
2.17.1


_______________________________________________
openconnect-devel mailing list
openconnect-devel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/openconnect-devel

Reply via email to