diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2020-05-07 10:51:25 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2020-05-07 10:51:25 +0200 |
commit | 1ce0ec72e62c44ce9816673af66d23f8e1334ce7 (patch) | |
tree | db071f58c4ba465fcac40140b1f2947bba7b507c /src/reclaim/oidc_helper.c | |
parent | 8377828bf2dce9de52ac50e5866b62a4b8150717 (diff) | |
download | gnunet-1ce0ec72e62c44ce9816673af66d23f8e1334ce7.tar.gz gnunet-1ce0ec72e62c44ce9816673af66d23f8e1334ce7.zip |
try to fix mess
Diffstat (limited to 'src/reclaim/oidc_helper.c')
-rw-r--r-- | src/reclaim/oidc_helper.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c index a5287c26d..e309ed01d 100644 --- a/src/reclaim/oidc_helper.c +++ b/src/reclaim/oidc_helper.c | |||
@@ -140,7 +140,6 @@ OIDC_id_token_new (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, | |||
140 | char *body_str; | 140 | char *body_str; |
141 | char *aggr_names_str; | 141 | char *aggr_names_str; |
142 | char *aggr_sources_str; | 142 | char *aggr_sources_str; |
143 | char *aggr_sources_jwt_str; | ||
144 | char *source_name; | 143 | char *source_name; |
145 | char *result; | 144 | char *result; |
146 | char *header_base64; | 145 | char *header_base64; |
@@ -206,7 +205,6 @@ OIDC_id_token_new (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, | |||
206 | attest_val_str = NULL; | 205 | attest_val_str = NULL; |
207 | aggr_names_str = NULL; | 206 | aggr_names_str = NULL; |
208 | aggr_sources_str = NULL; | 207 | aggr_sources_str = NULL; |
209 | aggr_sources_jwt_str = NULL; | ||
210 | source_name = NULL; | 208 | source_name = NULL; |
211 | int i = 0; | 209 | int i = 0; |
212 | for (ale = attests->list_head; NULL != ale; ale = ale->next) | 210 | for (ale = attests->list_head; NULL != ale; ale = ale->next) |
@@ -222,10 +220,9 @@ OIDC_id_token_new (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, | |||
222 | ale->attestation->data_size); | 220 | ale->attestation->data_size); |
223 | json_object_set_new (aggr_sources_jwt, "JWT", | 221 | json_object_set_new (aggr_sources_jwt, "JWT", |
224 | json_string (attest_val_str) ); | 222 | json_string (attest_val_str) ); |
225 | aggr_sources_jwt_str = json_dumps (aggr_sources_jwt, JSON_INDENT (0) | 223 | json_object_set_new (aggr_sources, source_name, aggr_sources_jwt); |
226 | | JSON_COMPACT); | 224 | GNUNET_free (source_name); |
227 | json_object_set_new (aggr_sources, source_name,json_string ( | 225 | source_name = NULL; |
228 | aggr_sources_jwt_str)); | ||
229 | i++; | 226 | i++; |
230 | } | 227 | } |
231 | 228 | ||
@@ -262,13 +259,12 @@ OIDC_id_token_new (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, | |||
262 | j); | 259 | j); |
263 | json_object_set_new (aggr_names, le->attribute->data, | 260 | json_object_set_new (aggr_names, le->attribute->data, |
264 | json_string (source_name)); | 261 | json_string (source_name)); |
262 | GNUNET_free (source_name); | ||
265 | } | 263 | } |
266 | } | 264 | } |
267 | 265 | ||
268 | if (NULL != attest_val_str) | 266 | if (NULL != attest_val_str) |
269 | GNUNET_free (attest_val_str); | 267 | GNUNET_free (attest_val_str); |
270 | if (NULL != source_name) | ||
271 | GNUNET_free (source_name); | ||
272 | if (0 != i) | 268 | if (0 != i) |
273 | { | 269 | { |
274 | aggr_names_str = json_dumps (aggr_names, JSON_INDENT (0) | JSON_COMPACT); | 270 | aggr_names_str = json_dumps (aggr_names, JSON_INDENT (0) | JSON_COMPACT); |
@@ -281,7 +277,6 @@ OIDC_id_token_new (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, | |||
281 | 277 | ||
282 | json_decref (aggr_names); | 278 | json_decref (aggr_names); |
283 | json_decref (aggr_sources); | 279 | json_decref (aggr_sources); |
284 | json_decref (aggr_sources_jwt); | ||
285 | 280 | ||
286 | body_str = json_dumps (body, JSON_INDENT (0) | JSON_COMPACT); | 281 | body_str = json_dumps (body, JSON_INDENT (0) | JSON_COMPACT); |
287 | json_decref (body); | 282 | json_decref (body); |
@@ -324,8 +319,6 @@ OIDC_id_token_new (const struct GNUNET_CRYPTO_EcdsaPublicKey *aud_key, | |||
324 | GNUNET_free (aggr_sources_str); | 319 | GNUNET_free (aggr_sources_str); |
325 | if (NULL != aggr_names_str) | 320 | if (NULL != aggr_names_str) |
326 | GNUNET_free (aggr_names_str); | 321 | GNUNET_free (aggr_names_str); |
327 | if (NULL != aggr_sources_jwt_str) | ||
328 | GNUNET_free (aggr_sources_jwt_str); | ||
329 | GNUNET_free (signature_base64); | 322 | GNUNET_free (signature_base64); |
330 | GNUNET_free (body_base64); | 323 | GNUNET_free (body_base64); |
331 | GNUNET_free (header_base64); | 324 | GNUNET_free (header_base64); |