gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: -simply assert


From: gnunet
Subject: [taler-exchange] branch master updated: -simply assert
Date: Tue, 05 Jul 2022 13:03:47 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 5659ba86 -simply assert
5659ba86 is described below

commit 5659ba8675bb571f0a27fc988e541e48a6dadf33
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Jul 5 13:03:45 2022 +0200

    -simply assert
---
 src/exchange-tools/taler-crypto-worker.c | 27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/src/exchange-tools/taler-crypto-worker.c 
b/src/exchange-tools/taler-crypto-worker.c
index a1db1e81..475d98c1 100644
--- a/src/exchange-tools/taler-crypto-worker.c
+++ b/src/exchange-tools/taler-crypto-worker.c
@@ -222,31 +222,28 @@ run (void *cls,
                                      &priv),
         GNUNET_JSON_spec_end ()
       };
-      if (GNUNET_OK != GNUNET_JSON_parse (args,
-                                          kx_spec,
-                                          NULL,
-                                          NULL))
+      if (GNUNET_OK !=
+          GNUNET_JSON_parse (args,
+                             kx_spec,
+                             NULL,
+                             NULL))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     "malformed op args\n");
         global_ret = 1;
         return;
       }
-      if (GNUNET_OK != GNUNET_CRYPTO_ecdh_eddsa (&priv,
-                                                 &pub,
-                                                 &key_material))
-      {
-        // FIXME: Return as result?
-        GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                    "kx failed\n");
-        global_ret = 1;
-        return;
-      }
+      GNUNET_assert (GNUNET_OK ==
+                     GNUNET_CRYPTO_ecdh_eddsa (&priv,
+                                               &pub,
+                                               &key_material));
       resp = GNUNET_JSON_PACK (
         GNUNET_JSON_pack_data_auto ("h",
                                     &key_material)
         );
-      json_dumpf (resp, stdout, JSON_COMPACT);
+      json_dumpf (resp,
+                  stdout,
+                  JSON_COMPACT);
       printf ("\n");
       fflush (stdout);
       GNUNET_log (GNUNET_ERROR_TYPE_INFO,

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