gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated (a415a2f -> 0aa4ad0)


From: gnunet
Subject: [taler-anastasis] branch master updated (a415a2f -> 0aa4ad0)
Date: Sun, 05 Jul 2020 19:13:14 +0200

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

dennis-neufeld pushed a change to branch master
in repository anastasis.

    from a415a2f  fixed latex issues (corrupt pdf, figure double link)
     new f9274d4  deleted unused variable
     new b5753eb  fixed incompatible argument warning
     new 6cb82fd  deleted unused functions
     new 1f09d16  fixed compiler warnings in assembler
     new 43d00be  fixed compiler warnings
     new 0aa4ad0  deleted odp-file

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 doc/verteidigung/Anastasis_Verteidigung.odp | Bin 6968731 -> 0 bytes
 doc/verteidigung/Anastasis_Verteidigung.pdf | Bin 10794444 -> 0 bytes
 src/cli/anastasis-cli-assembler.c           |  15 ++---
 src/cli/anastasis-cli-splitter.c            |   6 +-
 src/include/anastasis.h                     |   6 +-
 src/lib/anastasis.c                         |  98 ++--------------------------
 src/stasis/plugin_anastasis_postgres.c      |   4 --
 7 files changed, 18 insertions(+), 111 deletions(-)
 delete mode 100644 doc/verteidigung/Anastasis_Verteidigung.odp
 delete mode 100644 doc/verteidigung/Anastasis_Verteidigung.pdf

diff --git a/doc/verteidigung/Anastasis_Verteidigung.odp 
b/doc/verteidigung/Anastasis_Verteidigung.odp
deleted file mode 100644
index e783117..0000000
Binary files a/doc/verteidigung/Anastasis_Verteidigung.odp and /dev/null differ
diff --git a/doc/verteidigung/Anastasis_Verteidigung.pdf 
b/doc/verteidigung/Anastasis_Verteidigung.pdf
deleted file mode 100644
index 6885b19..0000000
Binary files a/doc/verteidigung/Anastasis_Verteidigung.pdf and /dev/null differ
diff --git a/src/cli/anastasis-cli-assembler.c 
b/src/cli/anastasis-cli-assembler.c
index 8d1c4d4..408ba76 100644
--- a/src/cli/anastasis-cli-assembler.c
+++ b/src/cli/anastasis-cli-assembler.c
@@ -225,7 +225,8 @@ challenge_answer_cb (void *af_cls,
     return;
   }
   printf ("Success truth#%u\n", cs->challenge_index);
-  challenges[cs->challenge_index].solved = 1;
+  unsigned int solved = 1;
+  challenges[cs->challenge_index].solved = &solved;
 }
 
 
@@ -306,7 +307,7 @@ read_keyboard_command (void *cls)
     for (unsigned int i = 0; i < challenges_length; i++)
     {
       char solved_state = '-';
-      if (challenges[i].solved == 1)
+      if (*challenges[i].solved == 1)
         solved_state = '+';
       printf ("truth#%u(%c): %s %s ",
               i,
@@ -340,7 +341,7 @@ read_keyboard_command (void *cls)
         for (unsigned int k = 0; k < challenges_length; k++)
         {
           if (0 == uuid_compare (policies[i].escrow_uuids[j],
-                                 challenges[k].uuid))
+                                 *challenges[k].uuid))
           {
             unsigned int new_currency = 1;
             unsigned int index = 0;
@@ -406,8 +407,8 @@ read_keyboard_command (void *cls)
         for (unsigned int k = 0; k < challenges_length; k++)
         {
           if (0 == uuid_compare (policies[i].escrow_uuids[j],
-                                 challenges[k].uuid))
-            if (1 != challenges[k].solved)
+                                 *challenges[k].uuid))
+            if (1 != *challenges[k].solved)
               printf ("truth#%u ", k);
         }
       }
@@ -600,7 +601,7 @@ config_cb (void *cls,
   unsigned int contains = 0;
   for (unsigned int i = 0; i < challenges_length; i++)
   {
-    if (0 == uuid_compare (challenges[i].uuid, cs->ci->uuid))
+    if (0 == uuid_compare (*challenges[i].uuid, *cs->ci->uuid))
     {
       contains = 1;
       break;
@@ -675,11 +676,9 @@ core_secret_cb (void *cls,
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "At %s:%d arrived at core secret cb \n", __FILE__, __LINE__);
-  struct RecoverSecretState *rss = cls;
   printf ("Secret was: \"%s\" Size: %lu b\n",
           (char *) secret,
           secret_size);
-
   return;
 }
 
diff --git a/src/cli/anastasis-cli-splitter.c b/src/cli/anastasis-cli-splitter.c
index 0a0f4fd..37d3b91 100644
--- a/src/cli/anastasis-cli-splitter.c
+++ b/src/cli/anastasis-cli-splitter.c
@@ -152,7 +152,7 @@ struct ServerInfo
   /**
    * user identifier derived from user data and backend salt
    */
-  const struct ANASTASIS_CRYPTO_UserIdentifierP *user_id;
+  struct ANASTASIS_CRYPTO_UserIdentifierP *user_id;
 };
 
 /**
@@ -1141,9 +1141,11 @@ read_keyboard_command (void *cls)
         {
           add_history (buffer);
           pds[i].payment_order_id = GNUNET_malloc (characters + 1);
-          GNUNET_strlcpy (pds[i].payment_order_id,
+          char *payment_order_id = NULL;
+          GNUNET_strlcpy (payment_order_id,
                           buffer,
                           characters);
+          pds[i].payment_order_id = (const char*) payment_order_id;
           free (buffer);
         }
         printf ("\n");
diff --git a/src/include/anastasis.h b/src/include/anastasis.h
index 5ef5954..6819cd3 100644
--- a/src/include/anastasis.h
+++ b/src/include/anastasis.h
@@ -153,11 +153,11 @@ struct ANASTASIS_ChallengeInformation
   const char *method;
   const char *url;
   const char *instructions;
-  const struct TALER_Amount *cost;
+  struct TALER_Amount *cost;
   const unsigned int *solved;
   const uuid_t *uuid;
-  const char *currency;
-  const struct ANASTASIS_Challenge *challenge;
+  char *currency;
+  struct ANASTASIS_Challenge *challenge;
 };
 
 /**
diff --git a/src/lib/anastasis.c b/src/lib/anastasis.c
index ca23698..da47dc0 100644
--- a/src/lib/anastasis.c
+++ b/src/lib/anastasis.c
@@ -24,96 +24,6 @@
 #include <taler/taler_json_lib.h>
 #include <gnunet/gnunet_util_lib.h>
 
-/**
- * FIXME: Needed? -> maybe needed in ANASTASIS_secret_share()
- * State for a "salt" CMD.
- */
-struct SaltState
-{
-  /**
-  * URL of the anastasis backend.
-  */
-  const char *anastasis_url;
-
-  /**
-   * Expected status code.
-   */
-  unsigned int http_status;
-
-  /**
-   * The /salt GET operation handle.
-   */
-  struct ANASTASIS_SaltOperation *so;
-
-  /**
-   * Server Salt
-   */
-  const struct ANASTASIS_CRYPTO_SaltP *salt;
-};
-
-
-/**
- * FIXME: Needed? -> maybe needed in ANASTASIS_secret_share()
- * Function called with the results of a #ANASTASIS_salt().
- *
- * @param cls closure
- * @param http_status HTTP status of the request
- * @param salt salt from the server
- */
-static void
-salt_cb (void *cls,
-         unsigned int http_status,
-         const struct ANASTASIS_CRYPTO_SaltP *salt)
-{
-  struct SaltState *ss = cls;
-
-  ss->so = NULL;
-
-  if (http_status != ss->http_status)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u in %s:%u\n",
-                http_status,
-                __FILE__,
-                __LINE__);
-    GNUNET_break (0);
-    return;
-  }
-  if (NULL == salt)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Salt is NULL in %s:%u\n",
-                __FILE__,
-                __LINE__);
-    GNUNET_break (0);
-    return;
-  }
-
-  ss->salt = salt;
-}
-
-
-/**
- * FIXME: Needed? -> maybe needed in ANASTASIS_secret_share()
- * Free the state of a "salt" CMD, and possibly
- * cancel it if it did not complete.
- *
- * @param cls closure.
- * @param cmd command being freed.
- */
-static void
-salt_cleanup (struct SaltState *ss)
-{
-  if (NULL != ss->so)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                "Salt request did not complete\n");
-    ANASTASIS_salt_cancel (ss->so);
-    ss->so = NULL;
-  }
-  GNUNET_free (ss);
-}
-
 
 /**
  * stores provider URLs, identity key material, decrypted recovery document 
(internally!)
@@ -288,7 +198,7 @@ struct ANASTASIS_Challenge
   /**
    * Challenge instructions
    */
-  char *instructions;
+  const char *instructions;
 
   /**
    * Cost for authentication
@@ -1712,7 +1622,7 @@ ANASTASIS_secret_share (struct GNUNET_CURL_Context *ctx,
                 "At %s:%d pss_length is %d!\n", __FILE__, __LINE__,
                 pss_length);
     GNUNET_break (0);
-    return;
+    return NULL;
   }
 
   ss = GNUNET_new (struct ANASTASIS_SecretShare);
@@ -1772,7 +1682,7 @@ ANASTASIS_secret_share (struct GNUNET_CURL_Context *ctx,
     {
       char buf[36];
       uuid_unparse (policies[k]->uuids[a], buf);
-      strncpy (uuids + a * strlen (buf),buf, strlen (buf));
+      strncpy (uuids + a * strlen (buf), buf, strlen (buf));
     }
     uuids[36 * policies[k]->uuids_length] = '\0';
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1917,7 +1827,7 @@ ANASTASIS_secret_share (struct GNUNET_CURL_Context *ctx,
   }
 
   recovery_document = json_pack (
-    "{s:o," /* decryption policie */
+    "{s:o," /* decryption policies */
     " s:o," /* escrow methods */
     " s:o}", /* encrypted core secret */
     "policies", dec_policies,
diff --git a/src/stasis/plugin_anastasis_postgres.c 
b/src/stasis/plugin_anastasis_postgres.c
index 8a862bf..251b129 100644
--- a/src/stasis/plugin_anastasis_postgres.c
+++ b/src/stasis/plugin_anastasis_postgres.c
@@ -1177,11 +1177,7 @@ postgres_lookup_account (void *cls,
 
   /* check if account exists */
   {
-    struct GNUNET_TIME_Absolute expiration_date;
     struct GNUNET_PQ_ResultSpec rs[] = {
-      /* FIXME: DELETE
-      GNUNET_PQ_result_spec_auto_from_type ("expiration_date",
-                                            &expiration_date),*/
       GNUNET_PQ_result_spec_end
     };
 

-- 
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]