diff options
Diffstat (limited to 'src/reclaim/plugin_rest_openid_connect.c')
-rw-r--r-- | src/reclaim/plugin_rest_openid_connect.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c index 563bdd749..36ae937c1 100644 --- a/src/reclaim/plugin_rest_openid_connect.c +++ b/src/reclaim/plugin_rest_openid_connect.c | |||
@@ -557,12 +557,12 @@ cleanup_handle (struct RequestHandle *handle) | |||
557 | GNUNET_RECLAIM_cancel (handle->idp_op); | 557 | GNUNET_RECLAIM_cancel (handle->idp_op); |
558 | if (NULL != handle->idp) | 558 | if (NULL != handle->idp) |
559 | GNUNET_RECLAIM_disconnect (handle->idp); | 559 | GNUNET_RECLAIM_disconnect (handle->idp); |
560 | GNUNET_free_non_null (handle->url); | 560 | GNUNET_free (handle->url); |
561 | GNUNET_free_non_null (handle->tld); | 561 | GNUNET_free (handle->tld); |
562 | GNUNET_free_non_null (handle->redirect_prefix); | 562 | GNUNET_free (handle->redirect_prefix); |
563 | GNUNET_free_non_null (handle->redirect_suffix); | 563 | GNUNET_free (handle->redirect_suffix); |
564 | GNUNET_free_non_null (handle->emsg); | 564 | GNUNET_free (handle->emsg); |
565 | GNUNET_free_non_null (handle->edesc); | 565 | GNUNET_free (handle->edesc); |
566 | if (NULL != handle->gns_op) | 566 | if (NULL != handle->gns_op) |
567 | GNUNET_GNS_lookup_cancel (handle->gns_op); | 567 | GNUNET_GNS_lookup_cancel (handle->gns_op); |
568 | if (NULL != handle->gns_handle) | 568 | if (NULL != handle->gns_handle) |
@@ -572,13 +572,13 @@ cleanup_handle (struct RequestHandle *handle) | |||
572 | GNUNET_NAMESTORE_disconnect (handle->namestore_handle); | 572 | GNUNET_NAMESTORE_disconnect (handle->namestore_handle); |
573 | if (NULL != handle->oidc) | 573 | if (NULL != handle->oidc) |
574 | { | 574 | { |
575 | GNUNET_free_non_null (handle->oidc->client_id); | 575 | GNUNET_free (handle->oidc->client_id); |
576 | GNUNET_free_non_null (handle->oidc->login_identity); | 576 | GNUNET_free (handle->oidc->login_identity); |
577 | GNUNET_free_non_null (handle->oidc->nonce); | 577 | GNUNET_free (handle->oidc->nonce); |
578 | GNUNET_free_non_null (handle->oidc->redirect_uri); | 578 | GNUNET_free (handle->oidc->redirect_uri); |
579 | GNUNET_free_non_null (handle->oidc->response_type); | 579 | GNUNET_free (handle->oidc->response_type); |
580 | GNUNET_free_non_null (handle->oidc->scope); | 580 | GNUNET_free (handle->oidc->scope); |
581 | GNUNET_free_non_null (handle->oidc->state); | 581 | GNUNET_free (handle->oidc->state); |
582 | json_decref (handle->oidc->response); | 582 | json_decref (handle->oidc->response); |
583 | GNUNET_free (handle->oidc); | 583 | GNUNET_free (handle->oidc); |
584 | } | 584 | } |
@@ -594,8 +594,8 @@ cleanup_handle (struct RequestHandle *handle) | |||
594 | GNUNET_CONTAINER_DLL_remove (handle->ego_head, | 594 | GNUNET_CONTAINER_DLL_remove (handle->ego_head, |
595 | handle->ego_tail, | 595 | handle->ego_tail, |
596 | ego_entry); | 596 | ego_entry); |
597 | GNUNET_free_non_null (ego_entry->identifier); | 597 | GNUNET_free (ego_entry->identifier); |
598 | GNUNET_free_non_null (ego_entry->keystring); | 598 | GNUNET_free (ego_entry->keystring); |
599 | GNUNET_free (ego_entry); | 599 | GNUNET_free (ego_entry); |
600 | } | 600 | } |
601 | GNUNET_free (handle); | 601 | GNUNET_free (handle); |
@@ -1734,7 +1734,7 @@ login_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
1734 | OIDC_COOKIE_EXPIRATION)); | 1734 | OIDC_COOKIE_EXPIRATION)); |
1735 | last_time = | 1735 | last_time = |
1736 | GNUNET_CONTAINER_multihashmap_get (OIDC_cookie_jar_map, &cache_key); | 1736 | GNUNET_CONTAINER_multihashmap_get (OIDC_cookie_jar_map, &cache_key); |
1737 | GNUNET_free_non_null (last_time); | 1737 | GNUNET_free (last_time); |
1738 | GNUNET_CONTAINER_multihashmap_put (OIDC_cookie_jar_map, | 1738 | GNUNET_CONTAINER_multihashmap_put (OIDC_cookie_jar_map, |
1739 | &cache_key, | 1739 | &cache_key, |
1740 | current_time, | 1740 | current_time, |
@@ -1804,7 +1804,7 @@ check_authorization (struct RequestHandle *handle, | |||
1804 | client_id = strtok (basic_authorization, ":"); | 1804 | client_id = strtok (basic_authorization, ":"); |
1805 | if (NULL == client_id) | 1805 | if (NULL == client_id) |
1806 | { | 1806 | { |
1807 | GNUNET_free_non_null (basic_authorization); | 1807 | GNUNET_free (basic_authorization); |
1808 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); | 1808 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); |
1809 | handle->response_code = MHD_HTTP_UNAUTHORIZED; | 1809 | handle->response_code = MHD_HTTP_UNAUTHORIZED; |
1810 | return GNUNET_SYSERR; | 1810 | return GNUNET_SYSERR; |
@@ -1812,7 +1812,7 @@ check_authorization (struct RequestHandle *handle, | |||
1812 | pass = strtok (NULL, ":"); | 1812 | pass = strtok (NULL, ":"); |
1813 | if (NULL == pass) | 1813 | if (NULL == pass) |
1814 | { | 1814 | { |
1815 | GNUNET_free_non_null (basic_authorization); | 1815 | GNUNET_free (basic_authorization); |
1816 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); | 1816 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); |
1817 | handle->response_code = MHD_HTTP_UNAUTHORIZED; | 1817 | handle->response_code = MHD_HTTP_UNAUTHORIZED; |
1818 | return GNUNET_SYSERR; | 1818 | return GNUNET_SYSERR; |
@@ -1826,7 +1826,7 @@ check_authorization (struct RequestHandle *handle, | |||
1826 | { | 1826 | { |
1827 | if (0 != strcmp (expected_pass, pass)) | 1827 | if (0 != strcmp (expected_pass, pass)) |
1828 | { | 1828 | { |
1829 | GNUNET_free_non_null (basic_authorization); | 1829 | GNUNET_free (basic_authorization); |
1830 | GNUNET_free (expected_pass); | 1830 | GNUNET_free (expected_pass); |
1831 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); | 1831 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); |
1832 | handle->response_code = MHD_HTTP_UNAUTHORIZED; | 1832 | handle->response_code = MHD_HTTP_UNAUTHORIZED; |
@@ -1836,7 +1836,7 @@ check_authorization (struct RequestHandle *handle, | |||
1836 | } | 1836 | } |
1837 | else | 1837 | else |
1838 | { | 1838 | { |
1839 | GNUNET_free_non_null (basic_authorization); | 1839 | GNUNET_free (basic_authorization); |
1840 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_SERVER_ERROR); | 1840 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_SERVER_ERROR); |
1841 | handle->edesc = GNUNET_strdup ("gnunet configuration failed"); | 1841 | handle->edesc = GNUNET_strdup ("gnunet configuration failed"); |
1842 | handle->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR; | 1842 | handle->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR; |
@@ -1852,7 +1852,7 @@ check_authorization (struct RequestHandle *handle, | |||
1852 | } | 1852 | } |
1853 | if (NULL == handle->ego_entry) | 1853 | if (NULL == handle->ego_entry) |
1854 | { | 1854 | { |
1855 | GNUNET_free_non_null (basic_authorization); | 1855 | GNUNET_free (basic_authorization); |
1856 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); | 1856 | handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); |
1857 | handle->response_code = MHD_HTTP_UNAUTHORIZED; | 1857 | handle->response_code = MHD_HTTP_UNAUTHORIZED; |
1858 | return GNUNET_SYSERR; | 1858 | return GNUNET_SYSERR; |
@@ -2504,7 +2504,7 @@ libgnunet_plugin_rest_openid_connect_done (void *cls) | |||
2504 | while (GNUNET_YES == | 2504 | while (GNUNET_YES == |
2505 | GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL, | 2505 | GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL, |
2506 | value)) | 2506 | value)) |
2507 | GNUNET_free_non_null (value); | 2507 | GNUNET_free (value); |
2508 | GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it); | 2508 | GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it); |
2509 | GNUNET_CONTAINER_multihashmap_destroy (OIDC_cookie_jar_map); | 2509 | GNUNET_CONTAINER_multihashmap_destroy (OIDC_cookie_jar_map); |
2510 | 2510 | ||
@@ -2513,10 +2513,10 @@ libgnunet_plugin_rest_openid_connect_done (void *cls) | |||
2513 | while (GNUNET_YES == | 2513 | while (GNUNET_YES == |
2514 | GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL, | 2514 | GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL, |
2515 | value)) | 2515 | value)) |
2516 | GNUNET_free_non_null (value); | 2516 | GNUNET_free (value); |
2517 | GNUNET_CONTAINER_multihashmap_destroy (OIDC_access_token_map); | 2517 | GNUNET_CONTAINER_multihashmap_destroy (OIDC_access_token_map); |
2518 | GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it); | 2518 | GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it); |
2519 | GNUNET_free_non_null (allow_methods); | 2519 | GNUNET_free (allow_methods); |
2520 | GNUNET_free (api); | 2520 | GNUNET_free (api); |
2521 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2521 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2522 | "OpenID Connect REST plugin is finished\n"); | 2522 | "OpenID Connect REST plugin is finished\n"); |