gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis] branch master updated: if we had a challenge code befo


From: gnunet
Subject: [taler-anastasis] branch master updated: if we had a challenge code before, submit it again
Date: Fri, 27 Aug 2021 23:00:15 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 4422260  if we had a challenge code before, submit it again
4422260 is described below

commit 442226045ced8412589155501dbd77ef841d5069
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Aug 27 23:00:06 2021 +0200

    if we had a challenge code before, submit it again
---
 src/reducer/anastasis_api_recovery_redux.c | 33 ++++++++++++++++++++++++------
 1 file changed, 27 insertions(+), 6 deletions(-)

diff --git a/src/reducer/anastasis_api_recovery_redux.c 
b/src/reducer/anastasis_api_recovery_redux.c
index 684b877..897a6dd 100644
--- a/src/reducer/anastasis_api_recovery_redux.c
+++ b/src/reducer/anastasis_api_recovery_redux.c
@@ -1697,12 +1697,33 @@ select_challenge_cb (void *cls,
       return;
     }
     /* trigger challenge */
-    ret = ANASTASIS_challenge_start (ci,
-                                     psp,
-                                     timeout,
-                                     NULL,   /* no answer */
-                                     &answer_feedback_cb,
-                                     sctx);
+    {
+      json_t *c = find_challenge_in_cs (sctx->state,
+                                        &cd->uuid);
+      json_t *pin = json_object_get (c,
+                                     "answer-pin");
+
+      if (NULL != pin)
+      {
+        uint64_t ianswer = json_integer_value (pin);
+
+        ret = ANASTASIS_challenge_answer2 (ci,
+                                           psp,
+                                           timeout,
+                                           ianswer,
+                                           &answer_feedback_cb,
+                                           sctx);
+      }
+      else
+      {
+        ret = ANASTASIS_challenge_start (ci,
+                                         psp,
+                                         timeout,
+                                         NULL, /* no answer */
+                                         &answer_feedback_cb,
+                                         sctx);
+      }
+    }
     if (GNUNET_OK != ret)
     {
       ANASTASIS_redux_fail_ (sctx->cb,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]