gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-challenger] 18/24: code cleaning and styling


From: gnunet
Subject: [taler-challenger] 18/24: code cleaning and styling
Date: Mon, 16 Sep 2024 13:26:07 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository challenger.

commit 7be09dcc18d9b1dff53db38c6da71d3a68349fc8
Author: Bohdan Potuzhnyi <potub1@bfh.ch>
AuthorDate: Sun Sep 15 10:28:27 2024 +0000

    code cleaning and styling
---
 src/challenger/challenger-httpd_authorize.c     | 10 +++++-----
 src/challenger/challenger-httpd_config.c        |  2 +-
 src/challenger/challenger-httpd_token.c         |  7 ++++---
 src/challengerdb/challenger-0001.sql            |  4 ++--
 src/challengerdb/pg_authorize_start.c           |  1 +
 src/challengerdb/pg_authorize_start.h           |  1 +
 src/challengerdb/plugin_challengerdb_postgres.c |  2 +-
 7 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/src/challenger/challenger-httpd_authorize.c 
b/src/challenger/challenger-httpd_authorize.c
index 18c35c4..5f24fe2 100644
--- a/src/challenger/challenger-httpd_authorize.c
+++ b/src/challenger/challenger-httpd_authorize.c
@@ -144,20 +144,20 @@ CH_handler_authorize (struct CH_HandlerContext *hc,
     = MHD_lookup_connection_value (hc->connection,
                                    MHD_GET_ARGUMENT_KIND,
                                    "redirect_uri");
-                                   
+
   code_challenge = MHD_lookup_connection_value(hc->connection,
                                                MHD_GET_ARGUMENT_KIND,
                                                "code_challenge");
-                                               
+
   code_challenge_method = MHD_lookup_connection_value(hc->connection,
                                                       MHD_GET_ARGUMENT_KIND,
-                                                      
"code_challenge_method");                                             
+                                                      "code_challenge_method");
   if (NULL != code_challenge)
   {
     if (NULL == code_challenge_method)
       code_challenge_method = "plain";
   }
-  
+
   /**
    * Safe check to not allow public clients without s256 code_challenge
    */
@@ -178,7 +178,7 @@ CH_handler_authorize (struct CH_HandlerContext *hc,
       TALER_EC_GENERIC_PARAMETER_MALFORMED,
       "redirect_uri (has to start with 'http://' or 'https://' or not use 
'plain'/NULL as code_challenge)");
   }
-  
+
   state
     = MHD_lookup_connection_value (hc->connection,
                                    MHD_GET_ARGUMENT_KIND,
diff --git a/src/challenger/challenger-httpd_config.c 
b/src/challenger/challenger-httpd_config.c
index 7fa65c3..c8ba888 100644
--- a/src/challenger/challenger-httpd_config.c
+++ b/src/challenger/challenger-httpd_config.c
@@ -28,7 +28,7 @@
  *
  * 0: original design
  * 1: revision to support SPA
- * 2: 
+ * 2:
  * 3: added support for RFC7636
  */
 
diff --git a/src/challenger/challenger-httpd_token.c 
b/src/challenger/challenger-httpd_token.c
index b633145..3ccd950 100644
--- a/src/challenger/challenger-httpd_token.c
+++ b/src/challenger/challenger-httpd_token.c
@@ -405,7 +405,8 @@ CH_handler_token (struct CH_HandlerContext *hc,
     /* Verify the code_challenge if present*/
     if (code_challenge != NULL)
     {
-      if (bc->code_verifier == NULL){
+      if (bc->code_verifier == NULL)
+      {
         GNUNET_break_op (0);
         GNUNET_free (client_scope);
         GNUNET_free (client_secret);
@@ -456,10 +457,10 @@ CH_handler_token (struct CH_HandlerContext *hc,
             "server_error",
             TALER_EC_CHALLENGER_HELPER_EXEC_FAILED,
             "Failed to encode hash to Base64 URL");
-       }
+        }
 
         if (0 != strcmp(encoded_hash, code_challenge))
-       {
+        {
           GNUNET_break_op(0);
           GNUNET_free(client_scope);
           GNUNET_free(client_secret);
diff --git a/src/challengerdb/challenger-0001.sql 
b/src/challengerdb/challenger-0001.sql
index 256ee31..42db4bb 100644
--- a/src/challengerdb/challenger-0001.sql
+++ b/src/challengerdb/challenger-0001.sql
@@ -60,7 +60,7 @@ CREATE TABLE IF NOT EXISTS validations
   ,client_state VARCHAR
   ,client_redirect_uri VARCHAR
  );
- 
+
  -- Add columns for PKCE (RFC 7636)
 ALTER TABLE validations
 ADD COLUMN IF NOT EXISTS code_challenge VARCHAR,
@@ -95,7 +95,7 @@ COMMENT ON COLUMN validations.expiration_time
 COMMENT ON COLUMN validations.code_challenge
   IS 'Code challenge used for PKCE';
 COMMENT ON COLUMN validations.code_challenge_method
-  IS 'Code challenge method used for PKCE (plain, s256)';  
+  IS 'Code challenge method used for PKCE (plain, s256)';
 
 CREATE INDEX IF NOT EXISTS validations_serial
   ON validations (validation_serial_id);
diff --git a/src/challengerdb/pg_authorize_start.c 
b/src/challengerdb/pg_authorize_start.c
index c127f53..37a46d6 100644
--- a/src/challengerdb/pg_authorize_start.c
+++ b/src/challengerdb/pg_authorize_start.c
@@ -16,6 +16,7 @@
 /**
  * @file challengerdb/pg_authorize_start.c
  * @brief Implementation of the authorize_start function for Postgres
+ * @author Christian Grothoff
  * @author Bohdan Potuzhnyi
  * @author Vlada Svirsh
  */
diff --git a/src/challengerdb/pg_authorize_start.h 
b/src/challengerdb/pg_authorize_start.h
index 8f336c3..d6c737a 100644
--- a/src/challengerdb/pg_authorize_start.h
+++ b/src/challengerdb/pg_authorize_start.h
@@ -16,6 +16,7 @@
 /**
  * @file challengerdb/pg_authorize_start.h
  * @brief implementation of the authorize_start function for Postgres
+ * @author Christian Grothoff
  * @author Bohdan Potuzhnyi
  * @author Vlada Svirsh
  */
diff --git a/src/challengerdb/plugin_challengerdb_postgres.c 
b/src/challengerdb/plugin_challengerdb_postgres.c
index c675add..7732529 100644
--- a/src/challengerdb/plugin_challengerdb_postgres.c
+++ b/src/challengerdb/plugin_challengerdb_postgres.c
@@ -417,7 +417,7 @@ libchallenger_plugin_db_postgres_init (void *cls)
   plugin->info_get_token
     = &CH_PG_info_get_token;
   plugin->token_add_token
-    = &CH_PG_token_add_token;  
+    = &CH_PG_token_add_token;
   return plugin;
 }
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]