gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 07/07: merge


From: gnunet
Subject: [taler-anastasis] 07/07: merge
Date: Sat, 12 Sep 2020 11:01:54 +0200

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

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

commit a7d37bfb05d27ca9c2800fcd3aa02c7eac8ca247
Merge: 514a95b 3e1fd2b
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Sat Sep 12 11:01:41 2020 +0200

    merge

 src/include/anastasis_database_lib.h    |  10 +-
 src/include/anastasis_database_plugin.h |  45 +++++
 src/stasis/plugin_anastasis_postgres.c  | 289 +++++++++++++++++++++++++++++++-
 3 files changed, 342 insertions(+), 2 deletions(-)

diff --cc src/include/anastasis_database_lib.h
index a0a1df8,f524fec..faf1e3f
--- a/src/include/anastasis_database_lib.h
+++ b/src/include/anastasis_database_lib.h
@@@ -46,7 -46,15 +46,15 @@@ ANASTASIS_DB_plugin_unload (struct ANAS
   * of results, so all non-negative values indicate success.
   */
  enum ANASTASIS_DB_QueryStatus
 -{  
 +{
+   /**
+    * Already valid code stored under this public key, please use the valid 
code
+    */
+   ANASTASIS_DB_STATUS_VALID_CODE_STORED = -6,
+   /**
+    * Provided Challenge code didnt match the server generated code
+    */
+   ANASTASIS_DB_STATUS_CHALLENGE_CODE_MISSMATCH = -5,
    /**
     * Update failed because the old recovery data hash does not match what we 
previously had in the DB.
     */
diff --cc src/include/anastasis_database_plugin.h
index 4ef5947,8d475be..96283ac
--- a/src/include/anastasis_database_plugin.h
+++ b/src/include/anastasis_database_plugin.h
@@@ -380,5 -380,50 +380,50 @@@ struct ANASTASIS_DatabasePlugi
                      uint32_t post_counter,
                      const struct ANASTASIS_PaymentSecretP *payment_secret,
                      const struct TALER_Amount *amount);
 -                    
++
+   /**
 -   * Verify the provided code with the code on the server. 
++   * Verify the provided code with the code on the server.
+    * If the code matches the function will return with success, if the code
+    * does not match, the retry counter will be decreased by one.
+    *
+    * @param cls closure
+    * @param truth_pub identification of the challenge which the code 
corresponds to
+    * @param code code which the user provided and wants to verify
 -     (already verified that this is a uint64_t no checks needed) 
++     (already verified that this is a uint64_t no checks needed)
+    * @return transaction status
+    */
 -   enum ANASTASIS_DB_QueryStatus
 -   (*verify_challenge_code)(void *cls,
 -                            const struct
 -                            ANASTASIS_CRYPTO_TruthPublicKeyP *truth_pub,
 -                            uint64_t code);
++  enum ANASTASIS_DB_QueryStatus
++  (*verify_challenge_code)(void *cls,
++                           const struct
++                           ANASTASIS_CRYPTO_TruthPublicKeyP *truth_pub,
++                           uint64_t code);
+   /**
+    * Insert a new challenge code for a given challenge identified by the 
challenge
+    * public key. The function will first check if there is already a valid 
code
+    * for this challenge present and wont insert a new one in this case.
+    *
+    * @param cls closure
+    * @param truth_public_key the identifier for the challenge
+    * @param code code which will be safed to check later
+    * @param expiration_time for how long is the code available
+    * @param retry_counter amount of retries allowed
+    * @return transaction status
+    */
 - 
++
+   enum ANASTASIS_DB_QueryStatus
+   (*store_challenge_code)(void *cls,
+                           const struct
+                           ANASTASIS_CRYPTO_TruthPublicKeyP *truth_public_key,
 -                          uint64_t code, 
++                          uint64_t code,
+                           struct GNUNET_TIME_Relative expiration_time,
 -                          unsigned int retry_counter); 
 -  
++                          unsigned int retry_counter);
++
+   /**
+    * FIXME maybe implemented in the postgres_gc but want it seperate first
+    * Function called to remove all expired codes in the database
+    * @return transaction status
+    */
+   enum ANASTASIS_DB_QueryStatus
 -  (*challenge_gc)(void *cls);                               
++  (*challenge_gc)(void *cls);
  };
  #endif

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