gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 06/08: fixed salt api


From: gnunet
Subject: [taler-anastasis] 06/08: fixed salt api
Date: Sun, 26 Apr 2020 21:33:49 +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 246d6de23771d382ff71a84522a61c19149f74c1
Author: Dennis Neufeld <address@hidden>
AuthorDate: Sun Apr 26 18:46:57 2020 +0000

    fixed salt api
---
 src/backend/anastasis-httpd_salt.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/src/backend/anastasis-httpd_salt.c 
b/src/backend/anastasis-httpd_salt.c
index e2c43c2..94891e7 100644
--- a/src/backend/anastasis-httpd_salt.c
+++ b/src/backend/anastasis-httpd_salt.c
@@ -40,24 +40,18 @@ AH_handler_salt (struct MHD_Connection *connection,
 {
   struct ANASTASIS_CRYPTO_Salt salt;
 
-  if (GNUNET_OK ==
-      GNUNET_CRYPTO_hash_from_string2 (AH_server_salt,
-                                       strlen (AH_server_salt),
-                                       &salt.salt))
-  {
-    GNUNET_break (0);
-    return TALER_MHD_reply_with_error (connection,
-                                       MHD_HTTP_INTERNAL_SERVER_ERROR,
-                                       TALER_EC_SERVER_JSON_INVALID,
-                                       "server_salt");
-  }
+  GNUNET_CRYPTO_hash (AH_server_salt,
+                      strlen (AH_server_salt),
+                      &salt.salt);
+
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "At %s:%d Server Salt is %s-%llu b\n", __FILE__, __LINE__,
               TALER_B2S (&salt),
               (unsigned long long) sizeof (salt));
+
   return TALER_MHD_reply_json_pack (connection,
                                     MHD_HTTP_OK,
-                                    "{s:s}",
+                                    "{s:o}",
                                     "server_salt",
                                     GNUNET_JSON_from_data_auto (&salt));
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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