gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated (388a76594 -> 637daa8cb)


From: gnunet
Subject: [gnunet] branch master updated (388a76594 -> 637daa8cb)
Date: Sun, 25 Aug 2024 15:14:56 +0200

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

martin-schanzenbach pushed a change to branch master
in repository gnunet.

    from 388a76594 fix exponential service test: shutdown logic, and new config 
API logic
     new 15f299d0b identity: fix HPKE encryption for ECDSA identities (Curve 
Ed25519!)
     new 187e5f5b0 gns: fix test against (new) gnunet.org IP
     new 637daa8cb transport: disable unreliable tests for meson

The 3 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:
 src/cli/gns/test_gns_redirect_lookup.sh    |  2 +-
 src/cli/identity/gnunet-identity.c         | 10 +++++-----
 src/cli/identity/meson.build               |  5 +++++
 src/cli/identity/test_identity_messages.sh |  2 +-
 src/lib/util/crypto_hpke.c                 |  6 ++++--
 src/service/identity/meson.build           |  2 +-
 src/service/transport/meson.build          |  2 ++
 7 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/src/cli/gns/test_gns_redirect_lookup.sh 
b/src/cli/gns/test_gns_redirect_lookup.sh
index d07406511..f41427e9e 100755
--- a/src/cli/gns/test_gns_redirect_lookup.sh
+++ b/src/cli/gns/test_gns_redirect_lookup.sh
@@ -26,7 +26,7 @@ fi
 rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
 
 TEST_IP_PLUS="127.0.0.1"
-TEST_IP_DNS="147.87.255.218"
+TEST_IP_DNS="193.5.87.218"
 TEST_RECORD_REDIRECT_SERVER="server"
 TEST_RECORD_REDIRECT_PLUS="server.+"
 TEST_RECORD_REDIRECT_DNS="gnunet.org"
diff --git a/src/cli/identity/gnunet-identity.c 
b/src/cli/identity/gnunet-identity.c
index 8ce998c10..52f8a7316 100644
--- a/src/cli/identity/gnunet-identity.c
+++ b/src/cli/identity/gnunet-identity.c
@@ -259,15 +259,15 @@ static void
 write_encrypted_message (void)
 {
   struct GNUNET_CRYPTO_PublicKey recipient;
-  struct GNUNET_CRYPTO_EcdhePublicKey hpke_key;
+  struct GNUNET_CRYPTO_EcdhePublicKey hpke_key = {0};
   size_t ct_len = strlen (write_msg) + 1
                   + GNUNET_CRYPTO_HPKE_SEAL_ONESHOT_OVERHEAD_BYTES;
   unsigned char ct[ct_len];
   if (GNUNET_CRYPTO_public_key_from_string (pubkey_msg, &recipient) !=
       GNUNET_SYSERR)
   {
-    GNUNET_assert (GNUNET_OK == GNUNET_CRYPTO_hpke_pk_to_x25519 (&recipient, &
-                                                                 hpke_key));
+    GNUNET_assert (GNUNET_OK ==
+                   GNUNET_CRYPTO_hpke_pk_to_x25519 (&recipient, &hpke_key));
     size_t msg_len = strlen (write_msg) + 1;
     if (GNUNET_OK == GNUNET_CRYPTO_hpke_seal_oneshot (&hpke_key,
                                                       NULL, 0, // FIXME 
provide?
@@ -309,8 +309,8 @@ read_encrypted_message (struct GNUNET_IDENTITY_Ego *ego)
   struct GNUNET_CRYPTO_EcdhePrivateKey hpke_key;
   char *deserialized_msg;
   size_t msg_len;
-  if (GNUNET_OK == GNUNET_STRINGS_string_to_data_alloc (read_msg, strlen (
-                                                          read_msg),
+  if (GNUNET_OK == GNUNET_STRINGS_string_to_data_alloc (read_msg,
+                                                        strlen (read_msg),
                                                         (void **) &
                                                         deserialized_msg,
                                                         &msg_len))
diff --git a/src/cli/identity/meson.build b/src/cli/identity/meson.build
index 4182b51cb..6aa97d361 100644
--- a/src/cli/identity/meson.build
+++ b/src/cli/identity/meson.build
@@ -11,6 +11,11 @@ test_messages = configure_file(input : 
'test_identity_messages.sh',
                output : 'test_identity_messages.sh',
                copy: true)
 
+configure_file(input : 'test_identity.conf',
+               output : 'test_identity.conf',
+               configuration : cdata,
+               install: false)
+
 test('test_identity_messages', test_messages,
      workdir: meson.current_build_dir(),
      suite: ['identity'])
diff --git a/src/cli/identity/test_identity_messages.sh 
b/src/cli/identity/test_identity_messages.sh
index 1ea42d5cf..74b66b794 100755
--- a/src/cli/identity/test_identity_messages.sh
+++ b/src/cli/identity/test_identity_messages.sh
@@ -45,6 +45,6 @@ fi
 if [ "$TEST_MSG" != "$MSG_DEC_ED" ]
 then
   diff  <(echo "$TEST_MSG" ) <(echo "$MSG_DEC_ED")
-  echo "Failed - \"$TEST_MSG\" != \"$MSG_DEC_ED\""
+  echo "Failed (EdDSA) - \"$TEST_MSG\" != \"$MSG_DEC_ED\""
   exit 1
 fi
diff --git a/src/lib/util/crypto_hpke.c b/src/lib/util/crypto_hpke.c
index 6dfa1c845..b9604fb85 100644
--- a/src/lib/util/crypto_hpke.c
+++ b/src/lib/util/crypto_hpke.c
@@ -975,8 +975,9 @@ GNUNET_CRYPTO_hpke_pk_to_x25519 (const struct 
GNUNET_CRYPTO_PublicKey *pk,
   switch (ntohl (pk->type))
   {
   case GNUNET_PUBLIC_KEY_TYPE_ECDSA:
-    memcpy (x25519->q_y, pk->ecdsa_key.q_y,
-            sizeof pk->ecdsa_key.q_y);
+    if (0 != crypto_sign_ed25519_pk_to_curve25519 (x25519->q_y,
+                                                   pk->ecdsa_key.q_y))
+    return GNUNET_OK;
   case GNUNET_PUBLIC_KEY_TYPE_EDDSA:
     if (0 != crypto_sign_ed25519_pk_to_curve25519 (x25519->q_y,
                                                    pk->eddsa_key.q_y))
@@ -999,6 +1000,7 @@ GNUNET_CRYPTO_hpke_sk_to_x25519 (const struct 
GNUNET_CRYPTO_PrivateKey *sk,
   case GNUNET_PUBLIC_KEY_TYPE_ECDSA:
     memcpy (x25519->d, sk->ecdsa_key.d,
             sizeof sk->ecdsa_key.d);
+    return GNUNET_OK;
   case GNUNET_PUBLIC_KEY_TYPE_EDDSA:
     if (0 != crypto_sign_ed25519_sk_to_curve25519 (x25519->d,
                                                    sk->eddsa_key.d))
diff --git a/src/service/identity/meson.build b/src/service/identity/meson.build
index 961badbbc..94376fb1c 100644
--- a/src/service/identity/meson.build
+++ b/src/service/identity/meson.build
@@ -4,7 +4,7 @@ libgnunetidentity_src = ['identity_api.c',
 
 gnunetserviceidentity_src = ['gnunet-service-identity.c']
 
-configure_file(input : 'identity.conf.in',
+configure_file(input : 'identity.conf',
                output : 'identity.conf',
                configuration : cdata,
                install: true,
diff --git a/src/service/transport/meson.build 
b/src/service/transport/meson.build
index 2f01c4a44..6e9f48f72 100644
--- a/src/service/transport/meson.build
+++ b/src/service/transport/meson.build
@@ -438,6 +438,7 @@ testcommunicator_bidirect_tcp = 
executable('test_communicator_bidirect-tcp',
                                            install: false)
 
 
+if false
 testtransport_test_names = [
     'test_transport_start_testcase',
     'test_transport_simple_send_performance',
@@ -462,6 +463,7 @@ foreach t : testtransport_test_names
     test(t, test_file, suite: 'transport', workdir: meson.current_build_dir(), 
is_parallel: false)
   endif
 endforeach
+endif
 
 test('test_communicator_basic-unix', testcommunicator_basic_unix,
      workdir: meson.current_build_dir(),

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