summaryrefslogtreecommitdiff
path: root/src/reducer
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-09-28 15:50:28 +0200
committerChristian Grothoff <christian@grothoff.org>2021-09-28 15:50:28 +0200
commit435950ee10fc3d58f7ff992a2c2a2a3f73efa806 (patch)
treec0f900b8ff04e4f5c9d9ec50d0657a76ea41372d /src/reducer
parent3c3984cdcb88d5d3eb568d7e9647a2f2c473c0bc (diff)
downloadanastasis-435950ee10fc3d58f7ff992a2c2a2a3f73efa806.tar.gz
anastasis-435950ee10fc3d58f7ff992a2c2a2a3f73efa806.tar.bz2
anastasis-435950ee10fc3d58f7ff992a2c2a2a3f73efa806.zip
theoretically, this completes the TOTP implementation, alas completely untested
Diffstat (limited to 'src/reducer')
-rw-r--r--src/reducer/anastasis_api_recovery_redux.c9
1 files changed, 6 insertions, 3 deletions
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,