From 3ccacbd78bf720294363648a496b635abe072408 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 17 Nov 2021 22:02:08 +0100 Subject: make anastasis build against latest Exchange --- src/testing/testing_api_cmd_keyshare_lookup.c | 51 ++++++++++++--------------- 1 file changed, 23 insertions(+), 28 deletions(-) (limited to 'src/testing/testing_api_cmd_keyshare_lookup.c') diff --git a/src/testing/testing_api_cmd_keyshare_lookup.c b/src/testing/testing_api_cmd_keyshare_lookup.c index 2d12767..5b2adea 100644 --- a/src/testing/testing_api_cmd_keyshare_lookup.c +++ b/src/testing/testing_api_cmd_keyshare_lookup.c @@ -222,7 +222,7 @@ keyshare_lookup_run (void *cls, const struct ANASTASIS_CRYPTO_TruthKeyP *truth_key; const struct ANASTASIS_CRYPTO_TruthUUIDP *truth_uuid; const struct ANASTASIS_PaymentSecretP *payment_secret; - const char *answer; + const char **answer; ksls->is = is; if (NULL == ksls->upload_reference) @@ -244,23 +244,21 @@ keyshare_lookup_run (void *cls, return; } { - const char *fn; + const char **fn; if (GNUNET_OK != - TALER_TESTING_get_trait_string (upload_cmd, - 0, - &fn)) + ANASTASIS_TESTING_get_trait_filename (upload_cmd, + &fn)) { GNUNET_break (0); TALER_TESTING_interpreter_fail (ksls->is); return; } - if (NULL != fn) - ksls->filename = GNUNET_strdup (fn); + if (NULL != *fn) + ksls->filename = GNUNET_strdup (*fn); } if (GNUNET_OK != ANASTASIS_TESTING_get_trait_truth_uuid (upload_cmd, - 0, &truth_uuid)) { GNUNET_break (0); @@ -275,7 +273,6 @@ keyshare_lookup_run (void *cls, } if (GNUNET_OK != ANASTASIS_TESTING_get_trait_truth_key (upload_cmd, - 0, &truth_key)) { GNUNET_break (0); @@ -304,14 +301,13 @@ keyshare_lookup_run (void *cls, } if (GNUNET_OK != ANASTASIS_TESTING_get_trait_code (download_cmd, - 0, &answer)) { GNUNET_break (0); TALER_TESTING_interpreter_fail (ksls->is); return; } - if (NULL == answer) + if (NULL == *answer) { GNUNET_break (0); TALER_TESTING_interpreter_fail (ksls->is); @@ -321,19 +317,18 @@ keyshare_lookup_run (void *cls, else { /* answer is the answer */ - answer = ksls->answer; + answer = &ksls->answer; } if (NULL != ksls->payment_reference) { const struct TALER_TESTING_Command *payment_cmd; - payment_cmd = TALER_TESTING_interpreter_lookup_command - (is, - ksls->payment_reference); + payment_cmd = TALER_TESTING_interpreter_lookup_command ( + is, + ksls->payment_reference); if (GNUNET_OK != ANASTASIS_TESTING_get_trait_payment_secret (payment_cmd, - 0, &payment_secret)) { GNUNET_break (0); @@ -349,9 +344,9 @@ keyshare_lookup_run (void *cls, { struct GNUNET_HashCode h_answer; - if (NULL != answer) - GNUNET_CRYPTO_hash (answer, - strlen (answer), + if (NULL != *answer) + GNUNET_CRYPTO_hash (*answer, + strlen (*answer), &h_answer); ksls->kslo = ANASTASIS_keyshare_lookup (is->ctx, ksls->anastasis_url, @@ -359,7 +354,7 @@ keyshare_lookup_run (void *cls, truth_key, payment_secret, GNUNET_TIME_UNIT_ZERO, - (NULL != answer) + (NULL != *answer) ? &h_answer : NULL, &keyshare_lookup_cb, @@ -414,14 +409,14 @@ keyshare_lookup_traits (void *cls, { struct KeyShareLookupState *ksls = cls; struct TALER_TESTING_Trait traits[] = { - ANASTASIS_TESTING_make_trait_payment_secret (0, - &ksls->payment_secret_response), - TALER_TESTING_make_trait_url (TALER_TESTING_UT_TALER_URL, - ksls->pay_uri), - TALER_TESTING_make_trait_order_id (0, - ksls->order_id), - ANASTASIS_TESTING_make_trait_code (0, - ksls->code), + ANASTASIS_TESTING_make_trait_payment_secret ( + &ksls->payment_secret_response), + TALER_TESTING_make_trait_payto_uri ( + (const char **) ksls->pay_uri), + TALER_TESTING_make_trait_order_id ( + (const char **) &ksls->order_id), + ANASTASIS_TESTING_make_trait_code ( + (const char **) ksls->code), TALER_TESTING_trait_end () }; -- cgit v1.2.3