diff options
Diffstat (limited to 'src/include/anastasis_database_plugin.h')
-rw-r--r-- | src/include/anastasis_database_plugin.h | 30 |
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 | |||
586 | * @param cls closure | 586 | * @param cls closure |
587 | * @param truth_uuid identification of the challenge which the code corresponds to | 587 | * @param truth_uuid identification of the challenge which the code corresponds to |
588 | * @param hashed_code code which the user provided and wants to verify | 588 | * @param hashed_code code which the user provided and wants to verify |
589 | * @param[out] code set to the original numeric code | ||
589 | * @param[out] satisfied set to true if the challenge is set to satisfied | 590 | * @param[out] satisfied set to true if the challenge is set to satisfied |
590 | * @return transaction status | 591 | * @return transaction status |
591 | */ | 592 | */ |
@@ -594,6 +595,7 @@ struct ANASTASIS_DatabasePlugin | |||
594 | void *cls, | 595 | void *cls, |
595 | const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_uuid, | 596 | const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_uuid, |
596 | const struct GNUNET_HashCode *hashed_code, | 597 | const struct GNUNET_HashCode *hashed_code, |
598 | uint64_t *code, | ||
597 | bool *satisfied); | 599 | bool *satisfied); |
598 | 600 | ||
599 | 601 | ||
@@ -655,38 +657,12 @@ struct ANASTASIS_DatabasePlugin | |||
655 | const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_uuid, | 657 | const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_uuid, |
656 | struct GNUNET_TIME_Relative rotation_period, | 658 | struct GNUNET_TIME_Relative rotation_period, |
657 | struct GNUNET_TIME_Relative validity_period, | 659 | struct GNUNET_TIME_Relative validity_period, |
658 | unsigned int retry_counter, | 660 | uint32_t retry_counter, |
659 | struct GNUNET_TIME_Absolute *retransmission_date, | 661 | struct GNUNET_TIME_Absolute *retransmission_date, |
660 | uint64_t *code); | 662 | uint64_t *code); |
661 | 663 | ||
662 | 664 | ||
663 | /** | 665 | /** |
664 | * Setup challenge code for a given challenge identified by the | ||
665 | * challenge public key. The function will first check if there is | ||
666 | * already a valid code for this challenge present and won't insert | ||
667 | * a new one in this case. This variant is not rate-limited, will | ||
668 | * return the existing challenge if it has not yet expired and will | ||
669 | * simply create new challenges when the old ones need to be | ||
670 | * rotated. | ||
671 | * | ||
672 | * @param cls closure | ||
673 | * @param truth_uuid the identifier for the challenge | ||
674 | * @param rotation_period for how long is the code available | ||
675 | * @param validity_period for how long is the code available | ||
676 | * @param[out] code set to the code which will be checked for later | ||
677 | * @return transaction status, | ||
678 | * #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT if @a code is now in the DB | ||
679 | */ | ||
680 | enum GNUNET_DB_QueryStatus | ||
681 | (*get_unlimited_challenge_code)( | ||
682 | void *cls, | ||
683 | const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_uuid, | ||
684 | struct GNUNET_TIME_Relative rotation_period, | ||
685 | struct GNUNET_TIME_Relative validity_period, | ||
686 | uint64_t *code); | ||
687 | |||
688 | |||
689 | /** | ||
690 | * Remember in the database that we successfully sent a challenge. | 666 | * Remember in the database that we successfully sent a challenge. |
691 | * | 667 | * |
692 | * @param cls closure | 668 | * @param cls closure |