summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-04-13 19:10:42 +0200
committerChristian Grothoff <christian@grothoff.org>2022-04-13 19:10:42 +0200
commit1398cca51c44709cd990fc7ed7b854b802004a97 (patch)
tree83a0278d2167a0510f0b348b33733e4cec25187f /src
parent49aebaedc3d200c8c9ce306f8e3ea5bdc4449a50 (diff)
downloadanastasis-1398cca51c44709cd990fc7ed7b854b802004a97.tar.gz
anastasis-1398cca51c44709cd990fc7ed7b854b802004a97.tar.bz2
anastasis-1398cca51c44709cd990fc7ed7b854b802004a97.zip
-fix #7050
Diffstat (limited to 'src')
-rw-r--r--src/lib/anastasis_recovery.c23
-rw-r--r--src/reducer/anastasis_api_recovery_redux.c6
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);