[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] 02/02: recovery test
From: |
gnunet |
Subject: |
[taler-anastasis] 02/02: recovery test |
Date: |
Wed, 13 May 2020 20:56:27 +0200 |
This is an automated email from the git hooks/post-receive script.
ds-meister pushed a commit to branch master
in repository anastasis.
commit 1f40b7e8d231037f92740d18c011c806d194b824
Author: Dominik Meister <address@hidden>
AuthorDate: Wed May 13 20:56:21 2020 +0200
recovery test
---
src/lib/anastasis.c | 61 ++++++++++++++++++++++++------------------------
src/lib/test_anastasis.c | 6 ++---
2 files changed, 34 insertions(+), 33 deletions(-)
diff --git a/src/lib/anastasis.c b/src/lib/anastasis.c
index cd3ef7e..7d9a1a6 100644
--- a/src/lib/anastasis.c
+++ b/src/lib/anastasis.c
@@ -401,7 +401,7 @@ ANASTASIS_challenge_answer (struct GNUNET_CURL_Context *ctx,
void *af_cls)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "At %s:%d we are here 2 \n", __FILE__, __LINE__);
+ "At %s:%d we are here 2 \n", __FILE__, __LINE__);
c->af = af;
@@ -596,16 +596,16 @@ policy_lookup_cb (void *cls,
"escrow_method", &cs[i].escrow_method));
cs[i].recovery = r;
GNUNET_assert (0 ==
- uuid_parse(uuid,
- cs[i].challenge_uuid));
- GNUNET_STRINGS_string_to_data(truth_key,
- strlen(truth_key),
- &cs[i].truth_key,
- sizeof(struct ANASTASIS_CRYPTO_TruthKeyP));
- GNUNET_STRINGS_string_to_data(truth_salt,
- strlen(truth_salt),
- &cs[i].truth_salt,
- sizeof(struct ANASTASIS_CRYPTO_SaltP));
+ uuid_parse (uuid,
+ cs[i].challenge_uuid));
+ GNUNET_STRINGS_string_to_data (truth_key,
+ strlen (truth_key),
+ &cs[i].truth_key,
+ sizeof(struct ANASTASIS_CRYPTO_TruthKeyP));
+ GNUNET_STRINGS_string_to_data (truth_salt,
+ strlen (truth_salt),
+ &cs[i].truth_salt,
+ sizeof(struct ANASTASIS_CRYPTO_SaltP));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"At %s:%d challenge_uuid is %s-%llu b\n", __FILE__, __LINE__,
@@ -652,30 +652,31 @@ policy_lookup_cb (void *cls,
uuids,
salt);
- GNUNET_STRINGS_string_to_data(enc_master_key,
- strlen(enc_master_key),
- &r->ri->dps[j].emk,
- sizeof(struct
ANASTASIS_CRYPTO_EncryptedMasterKeyP));
+ GNUNET_STRINGS_string_to_data (enc_master_key,
+ strlen (enc_master_key),
+ &r->ri->dps[j].emk,
+ sizeof(struct
+
ANASTASIS_CRYPTO_EncryptedMasterKeyP));
- GNUNET_STRINGS_string_to_data(salt,
- strlen(salt),
- &r->ri->dps[j].salt,
- sizeof(struct ANASTASIS_CRYPTO_SaltP));
+ GNUNET_STRINGS_string_to_data (salt,
+ strlen (salt),
+ &r->ri->dps[j].salt,
+ sizeof(struct ANASTASIS_CRYPTO_SaltP));
- r->ri->dps[j].escrow_uuids = GNUNET_new_array(r->ri->dps[j].uuids_length,
- uuid_t);
+ r->ri->dps[j].escrow_uuids = GNUNET_new_array (r->ri->dps[j].uuids_length,
+ uuid_t);
for (int a = 0; a < r->ri->dps[j].uuids_length; a++)
{
char buf[37];
- strncpy(buf,uuids+a*36,36);
+ strncpy (buf,uuids + a * 36,36);
buf[36] = '\0';
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"At %s:%d buf is %s\n", __FILE__, __LINE__,
&buf);
GNUNET_assert (0 ==
- uuid_parse(buf,
- r->ri->dps[j].escrow_uuids[a]));
+ uuid_parse (buf,
+ r->ri->dps[j].escrow_uuids[a]));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"At %s:%d escrow uuid is %s-%llu b\n", __FILE__, __LINE__,
@@ -1683,14 +1684,14 @@ ANASTASIS_secret_share (struct GNUNET_CURL_Context *ctx,
TALER_B2S (policies[k]),
(unsigned long long) sizeof (struct ANASTASIS_Policy));
- char uuids[36*policies[k]->uuids_length+1];
+ char uuids[36 * policies[k]->uuids_length + 1];
for (unsigned int a = 0; a < policies[k]->uuids_length; a++)
{
char buf[36];
- uuid_unparse(policies[k]->uuids[a], buf);
- strncpy(uuids+a*strlen(buf),buf, strlen(buf));
+ uuid_unparse (policies[k]->uuids[a], buf);
+ strncpy (uuids + a * strlen (buf),buf, strlen (buf));
}
- uuids[36*policies[k]->uuids_length] = '\0';
+ uuids[36 * policies[k]->uuids_length] = '\0';
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"At %s:%d uuids are %s b\n", __FILE__, __LINE__,
uuids);
@@ -1708,7 +1709,7 @@ ANASTASIS_secret_share (struct GNUNET_CURL_Context *ctx,
uuids,
"salt",
GNUNET_JSON_from_data_auto (
- &policies[k]->salt),
+ &policies[k]->salt),
"uuids_length",
policies[k]->uuids_length)))
{
@@ -1743,7 +1744,7 @@ ANASTASIS_secret_share (struct GNUNET_CURL_Context *ctx,
long) sizeof (policies[k]->truths[l]->truth_key));
char uuid[37];
- uuid_unparse(policies[k]->truths[l]->uuid, uuid);
+ uuid_unparse (policies[k]->truths[l]->uuid, uuid);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"At %s:%d uuid is %s b\n", __FILE__, __LINE__,
diff --git a/src/lib/test_anastasis.c b/src/lib/test_anastasis.c
index 1fa41d0..839ee51 100644
--- a/src/lib/test_anastasis.c
+++ b/src/lib/test_anastasis.c
@@ -296,19 +296,19 @@ run (void *cls,
"recover-secret-1",
0,
"HashOfSomeTruth1",
- strlen("HashOfSomeTruth1")),
+ strlen ("HashOfSomeTruth1")),
ANASTASIS_TESTING_cmd_challenge_answer ("challenge-answer-2",
MHD_HTTP_OK,
"recover-secret-1",
1,
"HashOfSomeTruth2",
- strlen("HashOfSomeTruth2")),
+ strlen ("HashOfSomeTruth2")),
ANASTASIS_TESTING_cmd_challenge_answer ("challenge-answer-3",
MHD_HTTP_OK,
"recover-secret-1",
2,
"HashOfSomeTruth3",
- strlen("HashOfSomeTruth3")),
+ strlen ("HashOfSomeTruth3")),
TALER_TESTING_cmd_end ()
};
--
To stop receiving notification emails like this one, please contact
address@hidden.