From 435950ee10fc3d58f7ff992a2c2a2a3f73efa806 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 28 Sep 2021 15:50:28 +0200 Subject: theoretically, this completes the TOTP implementation, alas completely untested --- src/reducer/anastasis_api_recovery_redux.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/reducer') diff --git a/src/reducer/anastasis_api_recovery_redux.c b/src/reducer/anastasis_api_recovery_redux.c index 897a6dd..8709cf9 100644 --- a/src/reducer/anastasis_api_recovery_redux.c +++ b/src/reducer/anastasis_api_recovery_redux.c @@ -1684,10 +1684,13 @@ select_challenge_cb (void *cls, json_object_set_new (sctx->state, "selected_challenge_uuid", GNUNET_JSON_from_data_auto (&cd->uuid))); - if (0 == strcmp ("question", - cd->type)) + if ( (0 == strcmp ("question", + cd->type)) || + (0 == strcmp ("totp", + cd->type)) ) { - /* security question, immediately request user to answer it */ + /* security question or TOTP: + immediately request user to answer it */ set_state (sctx->state, ANASTASIS_RECOVERY_STATE_CHALLENGE_SOLVING); sctx->cb (sctx->cb_cls, -- cgit v1.2.3