anastasis

Credential backup and recovery protocol and service
Log | Files | Refs | Submodules | README | LICENSE

commit 9d85b5d98dd41a70bd078195f617d1d96ac613ee
parent 11f7b6562c780682e13420c3d2cd0a657faf7f3b
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  6 Mar 2022 13:42:29 +0100

-nicer logging, remove FIXME, add check

Diffstat:
Msrc/backend/anastasis-httpd_truth-solve.c | 13+++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/backend/anastasis-httpd_truth-solve.c b/src/backend/anastasis-httpd_truth-solve.c @@ -695,6 +695,9 @@ return_key_share ( { struct ANASTASIS_CRYPTO_EncryptedKeyShareP encrypted_keyshare; + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Returning key share of %s\n", + TALER_B2S (truth_uuid)); { enum GNUNET_DB_QueryStatus qs; @@ -711,6 +714,12 @@ return_key_share ( TALER_EC_GENERIC_DB_FETCH_FAILED, "get key share"); case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: + /* this should be "impossible", after all the + client was able to solve the challenge! + (Exception: we deleted the truth via GC + just while the client was trying to recover. + Alas, highly unlikely...) */ + GNUNET_break (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_NOT_FOUND, TALER_EC_ANASTASIS_TRUTH_KEY_SHARE_GONE, @@ -720,8 +729,6 @@ return_key_share ( } } - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Returning key share\n"); { struct MHD_Response *resp; MHD_RESULT ret; @@ -1358,8 +1365,6 @@ AH_handler_truth_solve ( } /* random code, check against database */ - // FIXME: check that this statement NEVER puts - // a new code INTO the DB (old style!) cs = db->verify_challenge_code (db->cls, &gc->truth_uuid, &gc->challenge_response,