From 404eeb8d9de22ec997f3eb94feea65d5b1aac7b1 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Sat, 26 Oct 2019 19:55:26 +0200 Subject: [PATCH] uncrustify --- src/reclaim/plugin_rest_attestation_openid.c | 28 +++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/reclaim/plugin_rest_attestation_openid.c b/src/reclaim/plugin_rest_attestation_openid.c index f323b0b74..923bc00e5 100644 --- a/src/reclaim/plugin_rest_attestation_openid.c +++ b/src/reclaim/plugin_rest_attestation_openid.c @@ -218,7 +218,7 @@ handle_login (struct GNUNET_REST_RequestHandle *con_handle, char *config_section; char *authz_url; - //Get the idp URL parameter + // Get the idp URL parameter GNUNET_CRYPTO_hash ("idp", strlen ("idp"), &hc); if (GNUNET_YES != GNUNET_CONTAINER_multihashmap_contains (con_handle ->url_param_map, @@ -230,7 +230,7 @@ handle_login (struct GNUNET_REST_RequestHandle *con_handle, return; } idp = GNUNET_CONTAINER_multihashmap_get (con_handle->url_param_map, &hc); - //Get the idp config setting + // Get the idp config setting GNUNET_asprintf (&config_section, "reclaim-idp-%s", idp); if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, config_section, @@ -242,11 +242,11 @@ handle_login (struct GNUNET_REST_RequestHandle *con_handle, GNUNET_SCHEDULER_add_now (&do_error, handle); return; } - //FIXME add PKCE challenge - //FIXME store ego, pkce (and state for redirect back?) - //FIXME do we want to read client id, secret etc from config separately? + // FIXME add PKCE challenge + // FIXME store ego, pkce (and state for redirect back?) + // FIXME do we want to read client id, secret etc from config separately? handle->response_code = MHD_HTTP_FOUND; - //TODO add location header with authz url + // TODO add location header with authz url // resp = GNUNET_REST_create_response (NULL); MHD_add_response_header (resp, "Location", authz_url); @@ -289,7 +289,8 @@ get_ego_cont (struct RequestHandle *handle) { struct GNUNET_REST_RequestHandlerError err; static const struct GNUNET_REST_RequestHandler handlers[] = - { { MHD_HTTP_METHOD_GET, GNUNET_REST_API_NS_ATTESTATION_OPENID, &handle_login }, + { { MHD_HTTP_METHOD_GET, GNUNET_REST_API_NS_ATTESTATION_OPENID, + &handle_login }, { MHD_HTTP_METHOD_OPTIONS, GNUNET_REST_API_NS_ATTESTATION, &options_cont }, GNUNET_REST_HANDLER_END }; @@ -339,9 +340,9 @@ get_ego_cont (struct RequestHandle *handle) */ static void get_ego (void *cls, - struct GNUNET_IDENTITY_Ego *ego, - void **ctx, - const char *identifier) + struct GNUNET_IDENTITY_Ego *ego, + void **ctx, + const char *identifier) { struct RequestHandle *handle = cls; @@ -382,7 +383,7 @@ rest_identity_process_request (struct GNUNET_REST_RequestHandle *rest_handle, handle->proc_cls = proc_cls; handle->proc = proc; handle->rest_handle = rest_handle; - //Get the id URL parameter + // Get the id URL parameter GNUNET_CRYPTO_hash ("ego", strlen ("ego"), &hc); if (GNUNET_YES != GNUNET_CONTAINER_multihashmap_contains (rest_handle ->url_param_map, @@ -393,14 +394,15 @@ rest_identity_process_request (struct GNUNET_REST_RequestHandle *rest_handle, GNUNET_SCHEDULER_add_now (&do_error, handle); return; } - handle->ego_name = GNUNET_CONTAINER_multihashmap_get (rest_handle->url_param_map, &hc); + handle->ego_name = GNUNET_CONTAINER_multihashmap_get ( + rest_handle->url_param_map, &hc); handle->url = GNUNET_strdup (rest_handle->url); if (handle->url[strlen (handle->url) - 1] == '/') handle->url[strlen (handle->url) - 1] = '\0'; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connecting...\n"); handle->namestore_handle = GNUNET_NAMESTORE_connect (cfg); - //handle->timeout_task = FIXME + // handle->timeout_task = FIXME // GNUNET_SCHEDULER_add_delayed (handle->timeout, &do_timeout, handle); handle->identity_handle = GNUNET_IDENTITY_connect (cfg, &get_ego, handle); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connected\n"); -- 2.25.1