summaryrefslogtreecommitdiff
path: root/src/include/anastasis_database_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/anastasis_database_plugin.h')
-rw-r--r--src/include/anastasis_database_plugin.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/include/anastasis_database_plugin.h b/src/include/anastasis_database_plugin.h
index 1265f7b..079201d 100644
--- a/src/include/anastasis_database_plugin.h
+++ b/src/include/anastasis_database_plugin.h
@@ -661,6 +661,32 @@ struct ANASTASIS_DatabasePlugin
/**
+ * 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