diff options
Diffstat (limited to 'src/include/anastasis_testing_lib.h')
-rw-r--r-- | src/include/anastasis_testing_lib.h | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/src/include/anastasis_testing_lib.h b/src/include/anastasis_testing_lib.h index 80018d9..ba6f801 100644 --- a/src/include/anastasis_testing_lib.h +++ b/src/include/anastasis_testing_lib.h | |||
@@ -38,16 +38,10 @@ | |||
38 | #define ANASTASIS_TESTING_TRAIT_HASH_CURRENT 0 | 38 | #define ANASTASIS_TESTING_TRAIT_HASH_CURRENT 0 |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * Index used in #SYNC_TESTING_get_trait_hash() for the previous hash. | ||
42 | */ | ||
43 | #define ANASTASIS_TESTING_TRAIT_HASH_PREVIOUS 1 | ||
44 | |||
45 | /** | ||
46 | * Obtain a hash from @a cmd. | 41 | * Obtain a hash from @a cmd. |
47 | * | 42 | * |
48 | * @param cmd command to extract the number from. | 43 | * @param cmd command to extract the number from. |
49 | * @param index the number's index number, #ANASTASIS_TESTING_TRAIT_HASH_CURRENT or | 44 | * @param index the number's index number, use #ANASTASIS_TESTING_TRAIT_HASH_CURRENT |
50 | * #SYNC_TESTING_TRAIT_HASH_PREVIOUS | ||
51 | * @param[out] h set to the hash coming from @a cmd. | 45 | * @param[out] h set to the hash coming from @a cmd. |
52 | * @return #GNUNET_OK on success. | 46 | * @return #GNUNET_OK on success. |
53 | */ | 47 | */ |
@@ -107,8 +101,7 @@ ANASTASIS_TESTING_make_trait_truth_key ( | |||
107 | */ | 101 | */ |
108 | int | 102 | int |
109 | ANASTASIS_TESTING_get_trait_account_pub ( | 103 | ANASTASIS_TESTING_get_trait_account_pub ( |
110 | const struct | 104 | const struct TALER_TESTING_Command *cmd, |
111 | TALER_TESTING_Command *cmd, | ||
112 | unsigned int index, | 105 | unsigned int index, |
113 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP **pub); | 106 | const struct ANASTASIS_CRYPTO_AccountPublicKeyP **pub); |
114 | 107 | ||
@@ -216,7 +209,7 @@ ANASTASIS_TESTING_make_trait_truth_uuid ( | |||
216 | * | 209 | * |
217 | * @param cmd command to extract the number from. | 210 | * @param cmd command to extract the number from. |
218 | * @param index the number's index number. | 211 | * @param index the number's index number. |
219 | * @param[out] uuid set to the number coming from @a cmd. | 212 | * @param[out] eks set to the key share coming from @a cmd. |
220 | * @return #GNUNET_OK on success. | 213 | * @return #GNUNET_OK on success. |
221 | */ | 214 | */ |
222 | int | 215 | int |
@@ -255,10 +248,10 @@ ANASTASIS_TESTING_get_trait_code ( | |||
255 | 248 | ||
256 | 249 | ||
257 | /** | 250 | /** |
258 | * Offer a filename. | 251 | * Offer an authentication code. |
259 | * | 252 | * |
260 | * @param index the number's index number. | 253 | * @param index the number's index number. |
261 | * @param tpk the public key to offer. | 254 | * @param code the code to offer. |
262 | * @return trait on success | 255 | * @return trait on success |
263 | */ | 256 | */ |
264 | struct TALER_TESTING_Trait | 257 | struct TALER_TESTING_Trait |
@@ -300,7 +293,7 @@ TALER_TESTING_run_merchant (const char *config_filename, | |||
300 | * anastasis" function to do such tasks. | 293 | * anastasis" function to do such tasks. |
301 | * | 294 | * |
302 | * @param config_filename configuration filename. | 295 | * @param config_filename configuration filename. |
303 | * | 296 | * @param anastasis_url URL to use to confirm service running |
304 | * @return the process, or NULL if the process could not | 297 | * @return the process, or NULL if the process could not |
305 | * be started. | 298 | * be started. |
306 | */ | 299 | */ |
@@ -383,20 +376,33 @@ ANASTASIS_TESTING_cmd_policy_store ( | |||
383 | * Make the "policy lookup" command. | 376 | * Make the "policy lookup" command. |
384 | * | 377 | * |
385 | * @param label command label | 378 | * @param label command label |
386 | * @param ANASTASIS_url base URL of the ANASTASIS serving | 379 | * @param anastasis_url base URL of the ANASTASIS serving |
387 | * the policy lookup request. | 380 | * the policy store request. |
388 | * @param http_status expected HTTP status. | 381 | * @param http_status expected HTTP status. |
389 | * @param upload_ref reference to upload command | 382 | * @param upload_ref reference to upload command |
390 | * @return the command | 383 | * @return the command |
391 | */ | 384 | */ |
392 | struct TALER_TESTING_Command | 385 | struct TALER_TESTING_Command |
393 | ANASTASIS_TESTING_cmd_policy_lookup (const char *label, | 386 | ANASTASIS_TESTING_cmd_policy_lookup (const char *label, |
394 | const char *ANASTASIS_url, | 387 | const char *anastasis_url, |
395 | unsigned int http_status, | 388 | unsigned int http_status, |
396 | const char *upload_ref); | 389 | const char *upload_ref); |
397 | 390 | ||
398 | 391 | ||
399 | /** | 392 | /** |
393 | * Make the "policy lookup" command for a non-existent upload. | ||
394 | * | ||
395 | * @param label command label | ||
396 | * @param anastasis_url base URL of the ANASTASIS serving | ||
397 | * the policy lookup request. | ||
398 | * @return the command | ||
399 | */ | ||
400 | struct TALER_TESTING_Command | ||
401 | ANASTASIS_TESTING_cmd_policy_nx (const char *label, | ||
402 | const char *anastasis_url); | ||
403 | |||
404 | |||
405 | /** | ||
400 | * Types of options for performing the upload. Used as a bitmask. | 406 | * Types of options for performing the upload. Used as a bitmask. |
401 | */ | 407 | */ |
402 | enum ANASTASIS_TESTING_TruthStoreOption | 408 | enum ANASTASIS_TESTING_TruthStoreOption |
@@ -482,6 +488,8 @@ ANASTASIS_TESTING_cmd_truth_question ( | |||
482 | * @param answer (response to challenge) | 488 | * @param answer (response to challenge) |
483 | * @param payment_ref reference to the payment request | 489 | * @param payment_ref reference to the payment request |
484 | * @param upload_ref reference to upload command | 490 | * @param upload_ref reference to upload command |
491 | * @param lookup_mode 0 for security question, 1 for | ||
492 | * code-based | ||
485 | * @param ksdd expected status | 493 | * @param ksdd expected status |
486 | * @return the command | 494 | * @return the command |
487 | */ | 495 | */ |