summaryrefslogtreecommitdiff
path: root/src/testing/testing_cmd_truth_upload.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_cmd_truth_upload.c')
-rw-r--r--src/testing/testing_cmd_truth_upload.c57
1 files changed, 27 insertions, 30 deletions
diff --git a/src/testing/testing_cmd_truth_upload.c b/src/testing/testing_cmd_truth_upload.c
index 19692c8..2e3523b 100644
--- a/src/testing/testing_cmd_truth_upload.c
+++ b/src/testing/testing_cmd_truth_upload.c
@@ -3,14 +3,14 @@
Copyright (C) 2020 Anastasis SARL
Anastasis is free software; you can redistribute it and/or modify it under the
- terms of the GNU Lesser General Public License as published by the Free Software
+ terms of the GNU General Public License as published by the Free Software
Foundation; either version 3, or (at your option) any later version.
Anastasis is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- You should have received a copy of the GNU Affero General Public License along with
+ You should have received a copy of the GNU General Public License along with
Anastasis; see the file COPYING.GPL. If not, see <http://www.gnu.org/licenses/>
*/
/**
@@ -181,15 +181,15 @@ truth_upload_run (void *cls,
{
struct TruthUploadState *tus = cls;
const struct TALER_TESTING_Command *ref;
- const struct ANASTASIS_CRYPTO_ProviderSaltP *salt;
+ const struct ANASTASIS_CRYPTO_ProviderSaltP *provider_salt;
struct ANASTASIS_CRYPTO_UserIdentifierP user_id;
tus->is = is;
if (NULL != tus->salt_reference)
{
- ref = TALER_TESTING_interpreter_lookup_command
- (is,
- tus->salt_reference);
+ ref = TALER_TESTING_interpreter_lookup_command (
+ is,
+ tus->salt_reference);
if (NULL == ref)
{
GNUNET_break (0);
@@ -197,33 +197,31 @@ truth_upload_run (void *cls,
return;
}
if (GNUNET_OK !=
- ANASTASIS_TESTING_get_trait_salt (ref,
- 0,
- &salt))
+ ANASTASIS_TESTING_get_trait_provider_salt (ref,
+ &provider_salt))
{
GNUNET_break (0);
TALER_TESTING_interpreter_fail (tus->is);
return;
}
}
-
ANASTASIS_CRYPTO_user_identifier_derive (tus->id_data,
- salt,
+ provider_salt,
&user_id);
-
- tus->tuo = ANASTASIS_truth_upload (is->ctx,
- &user_id,
- tus->anastasis_url,
- tus->method,
- tus->instructions,
- tus->mime_type,
- salt,
- tus->truth_data,
- tus->truth_data_size,
- false, /* force payment */
- GNUNET_TIME_UNIT_ZERO,
- &truth_upload_cb,
- tus);
+ tus->tuo = ANASTASIS_truth_upload (
+ TALER_TESTING_interpreter_get_context (is),
+ &user_id,
+ tus->anastasis_url,
+ tus->method,
+ tus->instructions,
+ tus->mime_type,
+ provider_salt,
+ tus->truth_data,
+ tus->truth_data_size,
+ false, /* force payment */
+ GNUNET_TIME_UNIT_ZERO,
+ &truth_upload_cb,
+ tus);
if (NULL == tus->tuo)
{
GNUNET_break (0);
@@ -285,10 +283,9 @@ truth_upload_traits (void *cls,
{
struct TruthUploadState *tus = cls;
struct TALER_TESTING_Trait traits[] = {
- ANASTASIS_TESTING_make_trait_truth (0,
- tus->truth),
- ANASTASIS_TESTING_make_trait_payment_secret (0,
- &tus->payment_secret_response),
+ ANASTASIS_TESTING_make_trait_truth (
+ (const struct ANASTASIS_Truth **) &tus->truth),
+ ANASTASIS_TESTING_make_trait_payment_secret (&tus->payment_secret_response),
TALER_TESTING_trait_end ()
};