gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: -fix crypto test


From: gnunet
Subject: [taler-exchange] branch master updated: -fix crypto test
Date: Thu, 04 May 2023 16:04:32 +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 2de2b6e3 -fix crypto test
2de2b6e3 is described below

commit 2de2b6e3cfbd6e766d02b3c44e2238aafaa91baa
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu May 4 16:04:29 2023 +0200

    -fix crypto test
---
 src/util/test_crypto.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/src/util/test_crypto.c b/src/util/test_crypto.c
index 80a24777..80ce9083 100644
--- a/src/util/test_crypto.c
+++ b/src/util/test_crypto.c
@@ -355,15 +355,24 @@ test_exchange_sigs (void)
   struct TALER_MasterPrivateKeyP priv;
   struct TALER_MasterPublicKeyP pub;
   struct TALER_MasterSignatureP sig;
+  json_t *rest;
 
   GNUNET_CRYPTO_eddsa_key_create (&priv.eddsa_priv);
+  rest = json_array ();
+  GNUNET_assert (NULL != rest);
   TALER_exchange_wire_signature_make (pt,
+                                      NULL,
+                                      rest,
+                                      rest,
                                       &priv,
                                       &sig);
   GNUNET_CRYPTO_eddsa_key_get_public (&priv.eddsa_priv,
                                       &pub.eddsa_pub);
   if (GNUNET_OK !=
       TALER_exchange_wire_signature_check (pt,
+                                           NULL,
+                                           rest,
+                                           rest,
                                            &pub,
                                            &sig))
   {
@@ -373,12 +382,28 @@ test_exchange_sigs (void)
   if (GNUNET_OK ==
       TALER_exchange_wire_signature_check (
         "payto://x-taler-bank/localhost/Other",
+        NULL,
+        rest,
+        rest,
         &pub,
         &sig))
   {
     GNUNET_break (0);
     return 1;
   }
+  if (GNUNET_OK ==
+      TALER_exchange_wire_signature_check (
+        pt,
+        "http://example.com/";,
+        rest,
+        rest,
+        &pub,
+        &sig))
+  {
+    GNUNET_break (0);
+    return 1;
+  }
+  json_decref (rest);
   return 0;
 }
 

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