gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis] branch master updated: -fix #7050


From: gnunet
Subject: [taler-anastasis] branch master updated: -fix #7050
Date: Wed, 13 Apr 2022 19:10:45 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 1398cca  -fix #7050
1398cca is described below

commit 1398cca51c44709cd990fc7ed7b854b802004a97
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Apr 13 19:10:42 2022 +0200

    -fix #7050
---
 src/lib/anastasis_recovery.c               | 23 +++++++++++++----------
 src/reducer/anastasis_api_recovery_redux.c |  6 +++---
 2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/src/lib/anastasis_recovery.c b/src/lib/anastasis_recovery.c
index 95c131d..a9b8b31 100644
--- a/src/lib/anastasis_recovery.c
+++ b/src/lib/anastasis_recovery.c
@@ -1045,7 +1045,7 @@ ANASTASIS_recovery_serialize (const struct 
ANASTASIS_Recovery *r)
     }
     GNUNET_assert (NULL != dp->emk);
     dps = GNUNET_JSON_PACK (
-      GNUNET_JSON_pack_data_varsize ("emk",
+      GNUNET_JSON_pack_data_varsize ("encrypted_master_key",
                                      dp->emk,
                                      dp->emk_size),
       GNUNET_JSON_pack_data_auto ("master_salt",
@@ -1098,9 +1098,9 @@ ANASTASIS_recovery_serialize (const struct 
ANASTASIS_Recovery *r)
   return GNUNET_JSON_PACK (
     GNUNET_JSON_pack_data_auto ("id",
                                 &r->id),
-    GNUNET_JSON_pack_array_steal ("dps",
+    GNUNET_JSON_pack_array_steal ("decryption_policies",
                                   dps_arr),
-    GNUNET_JSON_pack_array_steal ("cs",
+    GNUNET_JSON_pack_array_steal ("challenges",
                                   cs_arr),
     GNUNET_JSON_pack_uint64 ("version",
                              r->ri.version),
@@ -1111,14 +1111,16 @@ ANASTASIS_recovery_serialize (const struct 
ANASTASIS_Recovery *r)
     GNUNET_JSON_pack_allow_null (
       GNUNET_JSON_pack_string ("secret_name",
                                r->secret_name)),
-    GNUNET_JSON_pack_data_varsize ("core_secret",
+    GNUNET_JSON_pack_data_varsize ("encrypted_core_secret",
                                    r->enc_core_secret,
                                    r->enc_core_secret_size));
 }
 
 
 /**
- * Parse the @a cs_array and update @a r accordingly
+ * Parse the @a cs_array with information about
+ * the various challenges and their solution state
+ * and update @a r accordingly
  *
  * @param[in,out] r recovery information to update
  * @param cs_arr serialized data to parse
@@ -1203,7 +1205,8 @@ parse_cs_array (struct ANASTASIS_Recovery *r,
 
 
 /**
- * Parse the @a dps_array and update @a r accordingly
+ * Parse the @a dps_array with our decryption policies
+ * and update @a r accordingly
  *
  * @param[in,out] r recovery information to update
  * @param dps_arr serialized data to parse
@@ -1232,7 +1235,7 @@ parse_dps_array (struct ANASTASIS_Recovery *r,
     struct DecryptionPolicy *dp = &r->dps[n_index];
     json_t *challenges;
     struct GNUNET_JSON_Specification spec[] = {
-      GNUNET_JSON_spec_varsize ("emk",
+      GNUNET_JSON_spec_varsize ("encrypted_master_key",
                                 &dp->emk,
                                 &dp->emk_size),
       GNUNET_JSON_spec_fixed_auto ("master_salt",
@@ -1372,13 +1375,13 @@ ANASTASIS_recovery_deserialize (struct 
GNUNET_CURL_Context *ctx,
         NULL),
       GNUNET_JSON_spec_uint32 ("version",
                                &version),
-      GNUNET_JSON_spec_json ("dps",
+      GNUNET_JSON_spec_json ("decryption_policies",
                              &dps_arr),
-      GNUNET_JSON_spec_json ("cs",
+      GNUNET_JSON_spec_json ("challenges",
                              &cs_arr),
       GNUNET_JSON_spec_json ("id_data",
                              &id_data),
-      GNUNET_JSON_spec_varsize ("core_secret",
+      GNUNET_JSON_spec_varsize ("encrypted_core_secret",
                                 &ecs,
                                 &ecs_size),
       GNUNET_JSON_spec_end ()
diff --git a/src/reducer/anastasis_api_recovery_redux.c 
b/src/reducer/anastasis_api_recovery_redux.c
index d0c3f2d..de4df1b 100644
--- a/src/reducer/anastasis_api_recovery_redux.c
+++ b/src/reducer/anastasis_api_recovery_redux.c
@@ -458,7 +458,7 @@ find_challenge_in_ri (json_t *state,
 
 
 /**
- * Find challenge of @a uuid in @a state under "cs".
+ * Find challenge of @a uuid in @a state under "challenges".
  *
  * @param state the state to search
  * @param uuid the UUID to search for
@@ -471,7 +471,7 @@ find_challenge_in_cs (json_t *state,
   json_t *rd = json_object_get (state,
                                 "recovery_document");
   json_t *cs = json_object_get (rd,
-                                "cs");
+                                "challenges");
   json_t *c;
   size_t off;
 
@@ -2191,7 +2191,7 @@ sync_providers (json_t *state,
     return NULL;
   }
   cs_arr = json_object_get (rd,
-                            "cs");
+                            "challenges");
   if (! json_is_array (cs_arr))
   {
     GNUNET_break_op (0);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]