summaryrefslogtreecommitdiff
path: root/src/include/anastasis_database_plugin.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-27 17:44:01 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-27 17:44:01 +0200
commit2e2a558a59d0e7a25953cddf2afb67b7ab96135c (patch)
treea8bbc38cdb83092cea3624a855d63a5fb8a71603 /src/include/anastasis_database_plugin.h
parent3a6466bb3854863b4b35deb08cb2e4ed03ebf12b (diff)
downloadanastasis-2e2a558a59d0e7a25953cddf2afb67b7ab96135c.tar.gz
anastasis-2e2a558a59d0e7a25953cddf2afb67b7ab96135c.tar.bz2
anastasis-2e2a558a59d0e7a25953cddf2afb67b7ab96135c.zip
fix retry counter logic, deal with negative retry counters, limit code reuse for iban method
Diffstat (limited to 'src/include/anastasis_database_plugin.h')
-rw-r--r--src/include/anastasis_database_plugin.h30
1 files changed, 3 insertions, 27 deletions
diff --git a/src/include/anastasis_database_plugin.h b/src/include/anastasis_database_plugin.h
index 079201d..565ad69 100644
--- a/src/include/anastasis_database_plugin.h
+++ b/src/include/anastasis_database_plugin.h
@@ -586,6 +586,7 @@ struct ANASTASIS_DatabasePlugin
* @param cls closure
* @param truth_uuid identification of the challenge which the code corresponds to
* @param hashed_code code which the user provided and wants to verify
+ * @param[out] code set to the original numeric code
* @param[out] satisfied set to true if the challenge is set to satisfied
* @return transaction status
*/
@@ -594,6 +595,7 @@ struct ANASTASIS_DatabasePlugin
void *cls,
const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_uuid,
const struct GNUNET_HashCode *hashed_code,
+ uint64_t *code,
bool *satisfied);
@@ -655,38 +657,12 @@ struct ANASTASIS_DatabasePlugin
const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_uuid,
struct GNUNET_TIME_Relative rotation_period,
struct GNUNET_TIME_Relative validity_period,
- unsigned int retry_counter,
+ uint32_t retry_counter,
struct GNUNET_TIME_Absolute *retransmission_date,
uint64_t *code);
/**
- * Setup challenge code for a given challenge identified by the
- * challenge public key. The function will first check if there is
- * already a valid code for this challenge present and won't insert
- * a new one in this case. This variant is not rate-limited, will
- * return the existing challenge if it has not yet expired and will
- * simply create new challenges when the old ones need to be
- * rotated.
- *
- * @param cls closure
- * @param truth_uuid the identifier for the challenge
- * @param rotation_period for how long is the code available
- * @param validity_period for how long is the code available
- * @param[out] code set to the code which will be checked for later
- * @return transaction status,
- * #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT if @a code is now in the DB
- */
- enum GNUNET_DB_QueryStatus
- (*get_unlimited_challenge_code)(
- void *cls,
- const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_uuid,
- struct GNUNET_TIME_Relative rotation_period,
- struct GNUNET_TIME_Relative validity_period,
- uint64_t *code);
-
-
- /**
* Remember in the database that we successfully sent a challenge.
*
* @param cls closure