Per the discussion I had on a much older attempt to patch this with
Daniel Lenski, I pulled out the not-so-great attempt to fix the form
field for the token support and just patched the prepare_stoken chunk
that's required for the token to work.

Thanks,
Andy
On Fri, Sep 7, 2018 at 10:49 AM Andy Wang <do...@moonteeth.com> wrote:
>
> 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