Skip to content
Browse files
stoken: Fix CSD/stoken interaction
When using CSD, the auth form could be parsed more than once per
connection.  Change the accounting so that stoken_tries only gets
incremented if a tokencode is actually generated.

Signed-off-by: Kevin Cernekee <>
  • Loading branch information
cernekee committed Oct 28, 2012
1 parent cff6b33 commit d7f91bbd038dcee3ca803a90d38f7456fe8229f2
Showing with 1 addition and 2 deletions.
  1. +1 −2 auth.c
3 auth.c
@@ -973,8 +973,6 @@ static int can_gen_tokencode(struct openconnect_info *vpninfo, struct oc_form_op
_("Server is rejecting the soft token; switching to manual entry\n"));
return -ENOENT;

return 0;
@@ -1010,6 +1008,7 @@ static int do_gen_tokencode(struct openconnect_info *vpninfo, struct oc_auth_for
return -EIO;

opt->value = strdup(tokencode);
return opt->value ? 0 : -ENOMEM;

0 comments on commit d7f91bb

Please sign in to comment.