summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/anastasis_authorization_plugin.h6
-rw-r--r--src/include/anastasis_database_plugin.h30
2 files changed, 9 insertions, 27 deletions
diff --git a/src/include/anastasis_authorization_plugin.h b/src/include/anastasis_authorization_plugin.h
index 55f6369..91a88f8 100644
--- a/src/include/anastasis_authorization_plugin.h
+++ b/src/include/anastasis_authorization_plugin.h
@@ -127,6 +127,12 @@ struct ANASTASIS_AuthorizationPlugin
bool payment_plugin_managed;
/**
+ * How often are retries allowed for challenges created
+ * by this plugin?
+ */
+ uint32_t retry_counter;
+
+ /**
* How long should a generated challenge be valid for this type of method.
*/
struct GNUNET_TIME_Relative code_validity_period;
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