summaryrefslogtreecommitdiff
path: root/src/include/anastasis_testing_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-03-02 23:39:26 +0100
committerChristian Grothoff <christian@grothoff.org>2022-03-02 23:39:26 +0100
commitcf4b6ebd6de3370da4b16d2f1ef19a2a3d3d0b12 (patch)
treeeeec41a888f4f9cbdb77d6f01844ef20fccc2a43 /src/include/anastasis_testing_lib.h
parent81311476b804c054e4ee19c9b182f3b34357f88f (diff)
downloadanastasis-cf4b6ebd6de3370da4b16d2f1ef19a2a3d3d0b12.tar.gz
anastasis-cf4b6ebd6de3370da4b16d2f1ef19a2a3d3d0b12.tar.bz2
anastasis-cf4b6ebd6de3370da4b16d2f1ef19a2a3d3d0b12.zip
push new /truth/ API through the entire implementation
Diffstat (limited to 'src/include/anastasis_testing_lib.h')
-rw-r--r--src/include/anastasis_testing_lib.h33
1 files changed, 27 insertions, 6 deletions
diff --git a/src/include/anastasis_testing_lib.h b/src/include/anastasis_testing_lib.h
index ba1b8a3..0066939 100644
--- a/src/include/anastasis_testing_lib.h
+++ b/src/include/anastasis_testing_lib.h
@@ -374,7 +374,28 @@ ANASTASIS_TESTING_cmd_truth_question (
/**
- * Make the "keyshare lookup" command.
+ * Make a "truth challenge" command.
+ *
+ * @param label command label
+ * @param anastasis_url base URL of the ANASTASIS serving
+ * the keyshare lookup request.
+ * @param answer (response to challenge)
+ * @param payment_ref reference to the payment request
+ * @param upload_ref reference to upload command
+ * @param http_status expected HTTP status
+ * @return the command
+ */
+struct TALER_TESTING_Command
+ANASTASIS_TESTING_cmd_truth_challenge (
+ const char *label,
+ const char *anastasis_url,
+ const char *payment_ref,
+ const char *upload_ref,
+ unsigned int http_status);
+
+
+/**
+ * Make a "truth solve" command.
*
* @param label command label
* @param anastasis_url base URL of the ANASTASIS serving
@@ -384,18 +405,18 @@ ANASTASIS_TESTING_cmd_truth_question (
* @param upload_ref reference to upload command
* @param lookup_mode 0 for security question, 1 for
* code-based
- * @param ksdd expected status
+ * @param http_status expected HTTP status
* @return the command
*/
struct TALER_TESTING_Command
-ANASTASIS_TESTING_cmd_keyshare_lookup (
+ANASTASIS_TESTING_cmd_truth_solve (
const char *label,
const char *anastasis_url,
const char *answer,
const char *payment_ref,
const char *upload_ref,
int lookup_mode,
- enum ANASTASIS_KeyShareDownloadStatus ksdd);
+ unsigned int http_status);
/**
@@ -633,7 +654,7 @@ ANASTASIS_TESTING_cmd_challenge_start (
const char *payment_ref,
const char *challenge_ref,
unsigned int challenge_index,
- enum ANASTASIS_ChallengeStatus expected_cs);
+ enum ANASTASIS_ChallengeStartStatus expected_cs);
/**
@@ -657,7 +678,7 @@ ANASTASIS_TESTING_cmd_challenge_answer (
unsigned int challenge_index,
const char *answer,
unsigned int mode,
- enum ANASTASIS_ChallengeStatus expected_cs);
+ enum ANASTASIS_ChallengeAnswerStatus expected_cs);
#endif