aboutsummaryrefslogtreecommitdiff
path: root/src/reclaim/plugin_rest_openid_connect.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-08-06 19:12:17 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-08-06 19:12:17 +0200
commit8c48060e129877767f58a8403deba8a4beaeea24 (patch)
tree79cbe944d851c7c7536b63641eb36cb96a87b4b5 /src/reclaim/plugin_rest_openid_connect.c
parentb12644f83637c2508a11927490ae0b94d8ee4095 (diff)
downloadgnunet-8c48060e129877767f58a8403deba8a4beaeea24.tar.gz
gnunet-8c48060e129877767f58a8403deba8a4beaeea24.zip
-fix rest plugin issues
Diffstat (limited to 'src/reclaim/plugin_rest_openid_connect.c')
-rw-r--r--src/reclaim/plugin_rest_openid_connect.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c
index 3221c1cce..db138c26b 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -1971,7 +1971,6 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle,
1971 struct GNUNET_RECLAIM_AttestationList *al = NULL; 1971 struct GNUNET_RECLAIM_AttestationList *al = NULL;
1972 struct GNUNET_RECLAIM_Ticket ticket; 1972 struct GNUNET_RECLAIM_Ticket ticket;
1973 struct GNUNET_CRYPTO_EcdsaPublicKey cid; 1973 struct GNUNET_CRYPTO_EcdsaPublicKey cid;
1974 const struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey;
1975 struct GNUNET_HashCode cache_key; 1974 struct GNUNET_HashCode cache_key;
1976 struct MHD_Response *resp; 1975 struct MHD_Response *resp;
1977 char *grant_type; 1976 char *grant_type;
@@ -2043,7 +2042,6 @@ token_endpoint (struct GNUNET_REST_RequestHandle *con_handle,
2043 GNUNET_SCHEDULER_add_now (&do_error, handle); 2042 GNUNET_SCHEDULER_add_now (&do_error, handle);
2044 return; 2043 return;
2045 } 2044 }
2046 privkey = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego);
2047 2045
2048 // REQUIRED code verifier 2046 // REQUIRED code verifier
2049 code_verifier = get_url_parameter_copy (handle, OIDC_CODE_VERIFIER_KEY); 2047 code_verifier = get_url_parameter_copy (handle, OIDC_CODE_VERIFIER_KEY);
@@ -2590,6 +2588,12 @@ libgnunet_plugin_rest_openid_connect_init (void *cls)
2590 return api; 2588 return api;
2591} 2589}
2592 2590
2591static int
2592cleanup_hashmap (void *cls, const struct GNUNET_HashCode *key, void *value)
2593{
2594 GNUNET_free (value);
2595 return GNUNET_YES;
2596}
2593 2597
2594/** 2598/**
2595 * Exit point from the plugin. 2599 * Exit point from the plugin.
@@ -2606,18 +2610,13 @@ libgnunet_plugin_rest_openid_connect_done (void *cls)
2606 2610
2607 plugin->cfg = NULL; 2611 plugin->cfg = NULL;
2608 2612
2609 struct GNUNET_CONTAINER_MultiHashMapIterator *hashmap_it; 2613 if (NULL != OIDC_cookie_jar_map)
2610 void *value = NULL; 2614 {
2611 hashmap_it = 2615 GNUNET_CONTAINER_multihashmap_iterate (OIDC_cookie_jar_map,
2612 GNUNET_CONTAINER_multihashmap_iterator_create (OIDC_cookie_jar_map); 2616 &cleanup_hashmap,
2613 while (GNUNET_YES == 2617 NULL);
2614 GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL, 2618 GNUNET_CONTAINER_multihashmap_destroy (OIDC_cookie_jar_map);
2615 value)) 2619 }
2616 GNUNET_free (value);
2617 GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it);
2618 GNUNET_CONTAINER_multihashmap_destroy (OIDC_cookie_jar_map);
2619
2620 GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it);
2621 GNUNET_free (allow_methods); 2620 GNUNET_free (allow_methods);
2622 if (NULL != gns_handle) 2621 if (NULL != gns_handle)
2623 GNUNET_GNS_disconnect (gns_handle); 2622 GNUNET_GNS_disconnect (gns_handle);