aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/plugin_reclaim_credential_jwt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reclaim/plugin_reclaim_credential_jwt.c')
-rw-r--r--src/reclaim/plugin_reclaim_credential_jwt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/reclaim/plugin_reclaim_credential_jwt.c b/src/reclaim/plugin_reclaim_credential_jwt.c
index aac0a6ea5..425ac3450 100644
--- a/src/reclaim/plugin_reclaim_credential_jwt.c
+++ b/src/reclaim/plugin_reclaim_credential_jwt.c
@@ -162,7 +162,7 @@ jwt_parse_attributes (void *cls,
162 char *decoded_jwt; 162 char *decoded_jwt;
163 char *tmp; 163 char *tmp;
164 json_t *json_val; 164 json_t *json_val;
165 json_error_t *json_err = NULL; 165 json_error_t json_err;
166 166
167 attrs = GNUNET_new (struct GNUNET_RECLAIM_AttributeList); 167 attrs = GNUNET_new (struct GNUNET_RECLAIM_AttributeList);
168 168
@@ -173,7 +173,7 @@ jwt_parse_attributes (void *cls,
173 (void **) &decoded_jwt); 173 (void **) &decoded_jwt);
174 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Decoded JWT: %s\n", decoded_jwt); 174 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Decoded JWT: %s\n", decoded_jwt);
175 GNUNET_assert (NULL != decoded_jwt); 175 GNUNET_assert (NULL != decoded_jwt);
176 json_val = json_loads (decoded_jwt, JSON_DECODE_ANY, json_err); 176 json_val = json_loads (decoded_jwt, JSON_DECODE_ANY, &json_err);
177 GNUNET_free (decoded_jwt); 177 GNUNET_free (decoded_jwt);
178 const char *key; 178 const char *key;
179 const char *addr_key; 179 const char *addr_key;
@@ -291,14 +291,14 @@ jwt_get_issuer (void *cls,
291 json_t *issuer_json; 291 json_t *issuer_json;
292 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Parsing JWT attributes.\n"); 292 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Parsing JWT attributes.\n");
293 json_t *json_val; 293 json_t *json_val;
294 json_error_t *json_err = NULL; 294 json_error_t json_err;
295 295
296 jwt_string = GNUNET_strndup (data, data_size); 296 jwt_string = GNUNET_strndup (data, data_size);
297 jwt_body = strtok (jwt_string, delim); 297 jwt_body = strtok (jwt_string, delim);
298 jwt_body = strtok (NULL, delim); 298 jwt_body = strtok (NULL, delim);
299 GNUNET_STRINGS_base64url_decode (jwt_body, strlen (jwt_body), 299 GNUNET_STRINGS_base64url_decode (jwt_body, strlen (jwt_body),
300 (void **) &decoded_jwt); 300 (void **) &decoded_jwt);
301 json_val = json_loads (decoded_jwt, JSON_DECODE_ANY, json_err); 301 json_val = json_loads (decoded_jwt, JSON_DECODE_ANY, &json_err);
302 GNUNET_free (decoded_jwt); 302 GNUNET_free (decoded_jwt);
303 GNUNET_free (jwt_string); 303 GNUNET_free (jwt_string);
304 if (NULL == json_val) 304 if (NULL == json_val)
@@ -368,14 +368,14 @@ jwt_get_expiration (void *cls,
368 json_t *exp_json; 368 json_t *exp_json;
369 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Parsing JWT attributes.\n"); 369 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Parsing JWT attributes.\n");
370 json_t *json_val; 370 json_t *json_val;
371 json_error_t *json_err = NULL; 371 json_error_t json_err;
372 372
373 jwt_string = GNUNET_strndup (data, data_size); 373 jwt_string = GNUNET_strndup (data, data_size);
374 jwt_body = strtok (jwt_string, delim); 374 jwt_body = strtok (jwt_string, delim);
375 jwt_body = strtok (NULL, delim); 375 jwt_body = strtok (NULL, delim);
376 GNUNET_STRINGS_base64url_decode (jwt_body, strlen (jwt_body), 376 GNUNET_STRINGS_base64url_decode (jwt_body, strlen (jwt_body),
377 (void **) &decoded_jwt); 377 (void **) &decoded_jwt);
378 json_val = json_loads (decoded_jwt, JSON_DECODE_ANY, json_err); 378 json_val = json_loads (decoded_jwt, JSON_DECODE_ANY, &json_err);
379 GNUNET_free (decoded_jwt); 379 GNUNET_free (decoded_jwt);
380 GNUNET_free (jwt_string); 380 GNUNET_free (jwt_string);
381 if (NULL == json_val) 381 if (NULL == json_val)