anastasis

Credential backup and recovery protocol and service
Log | Files | Refs | Submodules | README | LICENSE

commit 9b4e116d4d655088bbdff187c9c13ab22fe7b724
parent c2527bedd52f4c0bfd45d8a3f598a3660607ddc8
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 13 Dec 2024 15:46:52 +0100

-fix checks

Diffstat:
Msrc/reducer/anastasis_api_backup_redux.c | 2+-
Msrc/testing/test_anastasis_api.conf | 1+
Msrc/testing/testing_cmd_recover_secret.c | 34++++++++++++++++------------------
Msrc/testing/testing_cmd_truth_upload.c | 34++++++++++++++++------------------
4 files changed, 34 insertions(+), 37 deletions(-)

diff --git a/src/reducer/anastasis_api_backup_redux.c b/src/reducer/anastasis_api_backup_redux.c @@ -206,7 +206,7 @@ ANASTASIS_backup_start (const struct GNUNET_CONFIGURATION_Handle *cfg) GNUNET_assert (0); } - GNUENT_assert (0 == + GNUNET_assert (0 == close (pipefd_stdout[1])); reducer_stdout = fdopen (pipefd_stdout[0], "r"); diff --git a/src/testing/test_anastasis_api.conf b/src/testing/test_anastasis_api.conf @@ -34,6 +34,7 @@ PORT = 8082 [anastasis] PORT = 8086 DB = postgres +CURRENCY = EUR BUSINESS_NAME = "Checker's Test Inc." UPLOAD_LIMIT_MB = 1 ANNUAL_POLICY_UPLOAD_LIMIT = 64 diff --git a/src/testing/testing_cmd_recover_secret.c b/src/testing/testing_cmd_recover_secret.c @@ -192,25 +192,23 @@ recover_secret_run (void *cls, const struct ANASTASIS_CRYPTO_ProviderSaltP *provider_salt; rss->is = is; - if (NULL != rss->download_reference) + GNUNET_assert (NULL != rss->download_reference); + ref = TALER_TESTING_interpreter_lookup_command ( + is, + rss->download_reference); + if (NULL == ref) { - ref = TALER_TESTING_interpreter_lookup_command ( - is, - rss->download_reference); - if (NULL == ref) - { - GNUNET_break (0); - TALER_TESTING_interpreter_fail (rss->is); - return; - } - if (GNUNET_OK != - ANASTASIS_TESTING_get_trait_provider_salt (ref, - &provider_salt)) - { - GNUNET_break (0); - TALER_TESTING_interpreter_fail (rss->is); - return; - } + GNUNET_break (0); + TALER_TESTING_interpreter_fail (rss->is); + return; + } + if (GNUNET_OK != + ANASTASIS_TESTING_get_trait_provider_salt (ref, + &provider_salt)) + { + GNUNET_break (0); + TALER_TESTING_interpreter_fail (rss->is); + return; } if (NULL != rss->core_secret_reference) { diff --git a/src/testing/testing_cmd_truth_upload.c b/src/testing/testing_cmd_truth_upload.c @@ -185,25 +185,23 @@ truth_upload_run (void *cls, struct ANASTASIS_CRYPTO_UserIdentifierP user_id; tus->is = is; - if (NULL != tus->salt_reference) + GNUNET_assert (NULL != tus->salt_reference); + ref = TALER_TESTING_interpreter_lookup_command ( + is, + tus->salt_reference); + if (NULL == ref) { - ref = TALER_TESTING_interpreter_lookup_command ( - is, - tus->salt_reference); - if (NULL == ref) - { - GNUNET_break (0); - TALER_TESTING_interpreter_fail (tus->is); - return; - } - if (GNUNET_OK != - ANASTASIS_TESTING_get_trait_provider_salt (ref, - &provider_salt)) - { - GNUNET_break (0); - TALER_TESTING_interpreter_fail (tus->is); - return; - } + GNUNET_break (0); + TALER_TESTING_interpreter_fail (tus->is); + return; + } + if (GNUNET_OK != + 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, provider_salt,