diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-03-06 13:42:29 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-03-06 13:42:29 +0100 |
commit | 9d85b5d98dd41a70bd078195f617d1d96ac613ee (patch) | |
tree | b01f7df52de599d331d6dde6a11896bafce1faa4 /src/backend | |
parent | 11f7b6562c780682e13420c3d2cd0a657faf7f3b (diff) | |
download | anastasis-9d85b5d98dd41a70bd078195f617d1d96ac613ee.tar.gz anastasis-9d85b5d98dd41a70bd078195f617d1d96ac613ee.tar.bz2 anastasis-9d85b5d98dd41a70bd078195f617d1d96ac613ee.zip |
-nicer logging, remove FIXME, add check
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/anastasis-httpd_truth-solve.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/backend/anastasis-httpd_truth-solve.c b/src/backend/anastasis-httpd_truth-solve.c index a452d8e..12f232a 100644 --- 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, |