gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: BUILD: gnunet-signatures from gana


From: gnunet
Subject: [gnunet] branch master updated: BUILD: gnunet-signatures from gana
Date: Tue, 04 Jan 2022 15:53:33 +0100

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

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

The following commit(s) were added to refs/heads/master by this push:
     new a5ca7d597 BUILD: gnunet-signatures from gana
a5ca7d597 is described below

commit a5ca7d5975c65bdfdc02087cf54ea88f1fdf4bd7
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Tue Jan 4 15:53:29 2022 +0100

    BUILD: gnunet-signatures from gana
---
 Makefile.am                             |   4 +-
 contrib/gana                            |   2 +-
 src/include/gnunet_signatures.h         | 164 ++++++++++----------------------
 src/namestore/gnunet-namestore-fcfsd.c  |   2 +-
 src/transport/gnunet-communicator-tcp.c |  30 +++---
 src/transport/gnunet-communicator-udp.c |  20 ++--
 6 files changed, 77 insertions(+), 145 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 338f44f37..30cc02bc9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -81,8 +81,6 @@ gana-gns:
        @cd $(top_srcdir)/contrib/gana/gnu-name-system-default-tlds; make; cp 
tlds.conf ../../../src/gns
 
 gana-gnunet-signatures:
-       @cd $(top_srcdir)/contrib/gana/gnunet-signatures; make
-#FIXME: This is broken as we need legacy values?
-# cp gnunet_signatures.h ../../../src/include
+       @cd $(top_srcdir)/contrib/gana/gnunet-signatures; make; cp 
gnunet_signatures.h ../../../src/include
 
 
diff --git a/contrib/gana b/contrib/gana
index ecb597d6f..d2decfa7c 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit ecb597d6fb23e18a282059791c49716aa8ffd8cb
+Subproject commit d2decfa7cb332c107c82e221f51cc13e336b2061
diff --git a/src/include/gnunet_signatures.h b/src/include/gnunet_signatures.h
index 7c0c1d104..ef38e3b1e 100644
--- a/src/include/gnunet_signatures.h
+++ b/src/include/gnunet_signatures.h
@@ -1,6 +1,6 @@
 /*
-     This file is part of GNUnet.
-     Copyright (C) 2009 GNUnet e.V.
+     This file is part of GNUnet
+     Copyright (C) 2012-2022 GNUnet e.V.
 
      GNUnet is free software: you can redistribute it and/or modify it
      under the terms of the GNU Affero General Public License as published
@@ -17,250 +17,184 @@
 
      SPDX-License-Identifier: AGPL3.0-or-later
  */
-
-/**
- * @author Christian Grothoff
- *
- * @file
- * Constants for network signatures
- *
- * @defgroup signatures  Network signature definitions
- * @{
- */
-
 #ifndef GNUNET_SIGNATURES_H
 #define GNUNET_SIGNATURES_H
 
 #ifdef __cplusplus
-extern "C"
-{
-#if 0                           /* keep Emacsens' auto-indent happy */
+extern "C" {
+#if 0 /* keep Emacsens' auto-indent happy */
 }
 #endif
 #endif
 
-/**
- * Test signature, not valid for anything other than writing
- * a test. (Note that the signature verification code will
- * accept this value).
- */
-#define GNUNET_SIGNATURE_PURPOSE_TEST 0
-
-/**
- * Signature for confirming that this peer uses a particular address.
- */
-#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN 1
 
 /**
- * Signature for confirming that this peer intends to disconnect.
+ * Network signature purpose definitions.  Note that all values
+ * must be uint32_t and encoded in network byte order in the structs.
  */
-#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DISCONNECT 2
 
-/**
- * Signature for confirming a key revocation.
- */
-#define GNUNET_SIGNATURE_PURPOSE_REVOCATION 3
 
-/**
- * Signature for a namespace/pseudonym advertisement (by
- * the namespace owner).
- */
-#define GNUNET_SIGNATURE_PURPOSE_NAMESPACE_ADVERTISEMENT 4
 
 /**
- * Signature by which a peer affirms that it is
- * providing a certain bit of content (used
- * in LOCation URIs).
+ * Test signature, not valid for anything other than writing a test. (Note 
that the signature verification code will accept this value). (GNUnet)
  */
-#define GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT 5
+#define GNUNET_SIGNATURE_PURPOSE_TEST 0
 
 /**
- * Obsolete, legacy value.
+ * Signature for confirming that this peer uses a particular address. 
(GNUnet-TRANSPORT)
  */
-#define GNUNET_SIGNATURE_PURPOSE_FS_KBLOCK 6
+#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_PONG_OWN 1
 
 /**
- * Obsolete, legacy value.
+ * Signature for confirming that this peer intends to disconnect. 
(GNUnet-TRANSPORT)
  */
-#define GNUNET_SIGNATURE_PURPOSE_FS_SBLOCK 7
+#define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DISCONNECT 2
 
 /**
- * Obsolete, legacy value.
+ * Signature for confirming a key revocation. (GNUnet-Revocation)
  */
-#define GNUNET_SIGNATURE_PURPOSE_FS_NBLOCK 8
+#define GNUNET_SIGNATURE_PURPOSE_REVOCATION 3
 
 /**
- * Obsolete, legacy value.
+ * Signature for a namespace/pseudonym advertisement (by the namespace owner). 
(GNUnet-FS)
  */
-#define GNUNET_SIGNATURE_PURPOSE_FS_NBLOCK_KSIG 9
+#define GNUNET_SIGNATURE_PURPOSE_NAMESPACE_ADVERTISEMENT 4
 
 /**
- *
+ * Signature by which a peer affirms that it is providing a certain bit of 
content for use in LOCation URIs. (GNUnet-FS)
  */
-#define GNUNET_SIGNATURE_PURPOSE_RESOLVER_RESPONSE 10
+#define GNUNET_SIGNATURE_PURPOSE_PEER_PLACEMENT 5
 
 /**
- * Signature of an GNUNET_DNS_Advertisement
+ * Signature on a GNUNET_DNS_Advertisement. (GNUnet-DNS+Exit)
  */
 #define GNUNET_SIGNATURE_PURPOSE_DNS_RECORD 11
 
 /**
- * Signature of a chat message.
+ * Signature of a chat message. (GNUnet-MESSENGER)
  */
 #define GNUNET_SIGNATURE_PURPOSE_CHAT_MESSAGE 12
 
 /**
- * Signature of confirmation receipt for a chat message.
+ * Signature of confirmation receipt for a chat message. (GNUnet-MESSENGER)
  */
 #define GNUNET_SIGNATURE_PURPOSE_CHAT_RECEIPT 13
 
 /**
- * Signature of a network size estimate message.
+ * Signature of a network size estimate message. (GNUnet-NSE)
  */
 #define GNUNET_SIGNATURE_PURPOSE_NSE_SEND 14
 
 /**
- * Signature of a gnunet naming system record block
+ * Signature of a gnunet naming system record block (GNUnet-GNSRECORD)
  */
 #define GNUNET_SIGNATURE_PURPOSE_GNS_RECORD_SIGN 15
 
 /**
- * Purpose is to set a session key.
+ * Purpose is to set a session key. (GNUnet-CORE)
  */
 #define GNUNET_SIGNATURE_PURPOSE_SET_ECC_KEY 16
 
 /**
- * UBlock Signature, done using DSS, not ECC
+ * UBlock Signature, done using DSS, not ECC (GNUnet-FS)
  */
 #define GNUNET_SIGNATURE_PURPOSE_FS_UBLOCK 17
 
 /**
- * Accept state in regex DFA.  Peer affirms that
- * it offers the matching service.
+ * Accept state in regex DFA.  Peer affirms that it offers the matching 
service. (GNUnet-REGEX)
  */
 #define GNUNET_SIGNATURE_PURPOSE_REGEX_ACCEPT 18
 
 /**
- * Signature of a multicast message sent by the origin.
- */
-#define GNUNET_SIGNATURE_PURPOSE_MULTICAST_MESSAGE 19
-
-/**
- * Signature of a conversation ring.
+ * Signature of a conversation ring. (GNUnet-CONVERSATION)
  */
 #define GNUNET_SIGNATURE_PURPOSE_CONVERSATION_RING 20
 
 /**
- * Signature for the first round of distributed key generation.
+ * Signature for the first round of distributed key generation. 
(GNUnet-SECRETSHARING)
  */
 #define GNUNET_SIGNATURE_PURPOSE_SECRETSHARING_DKG1 21
 
 /**
- * Signature for the second round of distributed key generation.
+ * Signature for the second round of distributed key generation. 
(GNUnet-SECRETSHARING)
  */
 #define GNUNET_SIGNATURE_PURPOSE_SECRETSHARING_DKG2 22
 
 /**
- * Signature for cooperatice decryption.
+ * Signature for the cooperative decryption. (GNUnet-SECRETSHARING)
  */
 #define GNUNET_SIGNATURE_PURPOSE_SECRETSHARING_DECRYPTION 23
 
 /**
- * Signature of a multicast request sent by a member.
- */
-#define GNUNET_SIGNATURE_PURPOSE_MULTICAST_REQUEST 24
-
-/**
- * Signature for a sensor anomaly report message.
- */
-#define GNUNET_SIGNATURE_PURPOSE_SENSOR_ANOMALY_REPORT 25
-
-/**
- * Signature for a GNUid Token
- */
-#define GNUNET_SIGNATURE_PURPOSE_GNUID_TOKEN 26
-
-/**
- * Signature for a GNUid Ticket
+ * Signature for a GNUid Ticket (Reclaim)
  */
 #define GNUNET_SIGNATURE_PURPOSE_RECLAIM_CODE_SIGN 27
 
 /**
- * Signature for a GNUnet credential
+ * Signature for a GNUnet credential (Reclaim)
  */
 #define GNUNET_SIGNATURE_PURPOSE_DELEGATE 28
 
 /**
- * Signature by a peer affirming that this is one of its
- * addresses (for the given time period).
+ * Signature by a peer affirming that this is one of its addresses for the 
given time period. (GNUnet-TRANSPORT)
  */
 #define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_ADDRESS 29
 
 /**
- * Signature by a peer affirming that the given ephemeral
- * key is currently in use by that peer's transport service.
+ * Signature by a peer affirming that the given ephemeral key is currently in 
use by that peer's transport service. (GNUnet-TRANSPORT)
  */
 #define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_EPHEMERAL 30
 
 /**
- * Signature used by TCP communicator handshake,
+ * Signature used by TCP communicator handshake. (GNUnet-TRANSPORT-TCP)
  */
-#define GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE 31
+#define GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE 31
 
 /**
- * Signature used by TCP communicator rekey.
+ * Signature used by TCP communicator rekey. (GNUnet-TRANSPORT-TCP)
  */
-#define GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY 32
+#define GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY 32
 
 /**
- * Signature used by UDP communicator handshake
+ * Signature used by UDP communicator handshake. (GNUnet-TRANSPORT-UDP)
  */
-#define GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE 33
+#define GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE 33
 
 /**
- * Signature used by UDP broadcasts.
+ * Signature used by UDP broadcasts. (GNUnet-TRANSPORT-UDP)
  */
-#define GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST 34
+#define GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST 34
 
 /**
- * Signature by a peer affirming that it received a
- * challenge (and stating how long it expects the
- * address on which the challenge was received to
- * remain valid).
+ * Signature by a peer affirming that it received a challenge (and stating how 
long it expects the address on which the challenge was received to remain 
valid). (GNUnet-TRANSPORT)
  */
 #define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_CHALLENGE 35
 
 /**
- * Signature by a peer affirming that it is on a DV path.
+ * Signature by a peer affirming that it is on a DV path. (GNUnet-TRANSPORT)
  */
 #define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_HOP 36
 
 /**
- * Signature by a peer affirming that it originated the
- * DV path.
+ * Signature by a peer affirming that it originated the DV path. 
(GNUnet-TRANSPORT)
  */
 #define GNUNET_SIGNATURE_PURPOSE_TRANSPORT_DV_INITIATOR 37
 
 /**
- * Signature by a peer that like to create a connection.
+ * Signature by a peer that like to create a connection. (GNUnet-CADET)
  */
 #define GNUNET_SIGNATURE_PURPOSE_CADET_CONNECTION_INITIATOR 38
 
 /**
- * Signature by a peer sending back the nonce received at initial handshake.
+ * Signature by a peer sending back the nonce received at initial handshake. 
(GNUnet-TRANSPORT-TCP)
  */
-#define GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE_ACK 39
+#define GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE_ACK 39
 
-#if 0                           /* keep Emacsens' auto-indent happy */
+#if 0 /* keep Emacsens' auto-indent happy */
 {
 #endif
 #ifdef __cplusplus
 }
 #endif
 
-/* ifndef GNUNET_SIGNATURES_H */
 #endif
-
-/** @} */  /* end of group */
-
-/* end of gnunet_signatures.h */
diff --git a/src/namestore/gnunet-namestore-fcfsd.c 
b/src/namestore/gnunet-namestore-fcfsd.c
index 7ec9db156..56961deb5 100644
--- a/src/namestore/gnunet-namestore-fcfsd.c
+++ b/src/namestore/gnunet-namestore-fcfsd.c
@@ -789,7 +789,7 @@ create_response (void *cls,
                               "message", _ ("unable to process submitted 
data"),
                               NULL);
         rd->body_length = strlen (rd->body);
-        rd->code = MHD_HTTP_PAYLOAD_TOO_LARGE;
+        rd->code = MHD_HTTP_CONTENT_TOO_LARGE;
         return MHD_YES;
       case GNUNET_JSON_PR_JSON_INVALID:
         rd->body = make_json ("error", "true",
diff --git a/src/transport/gnunet-communicator-tcp.c 
b/src/transport/gnunet-communicator-tcp.c
index 2a5e33e2b..3bfdeaa90 100644
--- a/src/transport/gnunet-communicator-tcp.c
+++ b/src/transport/gnunet-communicator-tcp.c
@@ -115,7 +115,7 @@ GNUNET_NETWORK_STRUCT_BEGIN
 struct TcpHandshakeSignature
 {
   /**
-   * Purpose must be #GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE
+   * Purpose must be #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE
    */
   struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
 
@@ -153,7 +153,7 @@ struct TcpHandshakeSignature
 struct TcpHandshakeAckSignature
 {
   /**
-   * Purpose must be #GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE_ACK
+   * Purpose must be #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE_ACK
    */
   struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
 
@@ -190,7 +190,7 @@ struct TCPConfirmation
   struct GNUNET_PeerIdentity sender;
 
   /**
-   * Sender's signature of type #GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE
+   * Sender's signature of type 
#GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE
    */
   struct GNUNET_CRYPTO_EddsaSignature sender_sig;
 
@@ -225,7 +225,7 @@ struct TCPConfirmationAck
   struct GNUNET_PeerIdentity sender;
 
   /**
-   * Sender's signature of type 
#GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE_ACK
+   * Sender's signature of type 
#GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE_ACK
    */
   struct GNUNET_CRYPTO_EddsaSignature sender_sig;
 
@@ -297,7 +297,7 @@ struct TCPRekey
   struct GNUNET_CRYPTO_EcdhePublicKey ephemeral;
 
   /**
-   * Sender's signature of type #GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY
+   * Sender's signature of type 
#GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY
    */
   struct GNUNET_CRYPTO_EddsaSignature sender_sig;
 
@@ -315,7 +315,7 @@ struct TCPRekey
 struct TcpRekeySignature
 {
   /**
-   * Purpose must be #GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY
+   * Purpose must be #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY
    */
   struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
 
@@ -1313,7 +1313,7 @@ do_rekey (struct Queue *queue, const struct TCPRekey 
*rekey)
 {
   struct TcpRekeySignature thp;
 
-  thp.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY);
+  thp.purpose.purpose = htonl 
(GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY);
   thp.purpose.size = htonl (sizeof(thp));
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "do_rekey size %u\n",
@@ -1340,7 +1340,7 @@ do_rekey (struct Queue *queue, const struct TCPRekey 
*rekey)
                 GNUNET_TIME_absolute_ntoh (thp.monotonic_time)));
   GNUNET_assert (ntohl ((&thp)->purpose.size) == sizeof (*(&thp)));
   if (GNUNET_OK !=
-      GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY,
+      GNUNET_CRYPTO_eddsa_verify 
(GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY,
                                   &thp,
                                   &rekey->sender_sig,
                                   &queue->target.public_key))
@@ -1464,7 +1464,7 @@ send_challenge (struct ChallengeNonceP challenge, struct 
Queue *queue)
   tca.monotonic_time =
     GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (cfg));
   thas.purpose.purpose = htonl (
-    GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE_ACK);
+    GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE_ACK);
   thas.purpose.size = htonl (sizeof(thas));
   thas.sender = my_identity;
   thas.receiver = queue->target;
@@ -1527,7 +1527,7 @@ inject_rekey (struct Queue *queue)
   GNUNET_CRYPTO_ecdhe_key_get_public (&queue->ephemeral, &rekey.ephemeral);
   rekey.monotonic_time =
     GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (cfg));
-  thp.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_TCP_REKEY);
+  thp.purpose.purpose = htonl 
(GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_REKEY);
   thp.purpose.size = htonl (sizeof(thp));
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "inject_rekey size %u\n",
@@ -1725,7 +1725,7 @@ try_handle_plaintext (struct Queue *queue)
     }
 
     thas.purpose.purpose = htonl (
-      GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE_ACK);
+      GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE_ACK);
     thas.purpose.size = htonl (sizeof(thas));
     thas.sender = tca->sender;
     thas.receiver = my_identity;
@@ -1733,7 +1733,7 @@ try_handle_plaintext (struct Queue *queue)
     thas.challenge = tca->challenge;
 
     if (GNUNET_SYSERR == GNUNET_CRYPTO_eddsa_verify (
-          GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE_ACK,
+          GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE_ACK,
           &thas,
           &tca->sender_sig,
           &tca->sender.public_key))
@@ -2472,7 +2472,7 @@ transmit_kx (struct Queue *queue,
   GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
                               &tc.challenge,
                               sizeof(tc.challenge));
-  ths.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE);
+  ths.purpose.purpose = htonl 
(GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE);
   ths.purpose.size = htonl (sizeof(ths));
   ths.sender = my_identity;
   ths.receiver = queue->target;
@@ -2625,7 +2625,7 @@ decrypt_and_check_tc (struct Queue *queue,
                          sizeof(*tc),
                          &ibuf[sizeof(struct GNUNET_CRYPTO_EcdhePublicKey)],
                          sizeof(*tc)));
-  ths.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE);
+  ths.purpose.purpose = htonl 
(GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE);
   ths.purpose.size = htonl (sizeof(ths));
   ths.sender = tc->sender;
   ths.receiver = my_identity;
@@ -2633,7 +2633,7 @@ decrypt_and_check_tc (struct Queue *queue,
   ths.monotonic_time = tc->monotonic_time;
   ths.challenge = tc->challenge;
   ret = GNUNET_CRYPTO_eddsa_verify (
-    GNUNET_SIGNATURE_COMMUNICATOR_TCP_HANDSHAKE,
+    GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_TCP_HANDSHAKE,
     &ths,
     &tc->sender_sig,
     &tc->sender.public_key);
diff --git a/src/transport/gnunet-communicator-udp.c 
b/src/transport/gnunet-communicator-udp.c
index 201e94e80..b6edff485 100644
--- a/src/transport/gnunet-communicator-udp.c
+++ b/src/transport/gnunet-communicator-udp.c
@@ -164,7 +164,7 @@ GNUNET_NETWORK_STRUCT_BEGIN
 struct UdpHandshakeSignature
 {
   /**
-   * Purpose must be #GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE
+   * Purpose must be #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE
    */
   struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
 
@@ -227,7 +227,7 @@ struct UDPConfirmation
   struct GNUNET_PeerIdentity sender;
 
   /**
-   * Sender's signature of type #GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE
+   * Sender's signature of type 
#GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE
    */
   struct GNUNET_CRYPTO_EddsaSignature sender_sig;
 
@@ -284,7 +284,7 @@ struct UDPAck
 struct UdpBroadcastSignature
 {
   /**
-   * Purpose must be #GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST
+   * Purpose must be #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST
    */
   struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
 
@@ -315,7 +315,7 @@ struct UDPBroadcast
 
   /**
    * Sender's signature of type
-   * #GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST
+   * #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST
    */
   struct GNUNET_CRYPTO_EddsaSignature sender_sig;
 };
@@ -2202,14 +2202,14 @@ verify_confirmation (const struct 
GNUNET_CRYPTO_EcdhePublicKey *ephemeral,
 {
   struct UdpHandshakeSignature uhs;
 
-  uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE);
+  uhs.purpose.purpose = htonl 
(GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE);
   uhs.purpose.size = htonl (sizeof(uhs));
   uhs.sender = uc->sender;
   uhs.receiver = my_identity;
   uhs.ephemeral = *ephemeral;
   uhs.monotonic_time = uc->monotonic_time;
   return GNUNET_CRYPTO_eddsa_verify (
-    GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE,
+    GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE,
     &uhs,
     &uc->sender_sig,
     &uc->sender.public_key);
@@ -2350,7 +2350,7 @@ sock_read (void *cls)
                 "received UDPBroadcast from %s\n",
                 GNUNET_a2s ((const struct sockaddr *) addr_verify, salen));
     ub = (const struct UDPBroadcast *) buf;
-    uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST);
+    uhs.purpose.purpose = htonl 
(GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST);
     uhs.purpose.size = htonl (sizeof(uhs));
     uhs.sender = ub->sender;
     sender = ub->sender;
@@ -2366,7 +2366,7 @@ sock_read (void *cls)
                 GNUNET_i2s (&sender));
     GNUNET_CRYPTO_hash ((struct sockaddr *) addr_verify, salen, 
&uhs.h_address);
     if (GNUNET_OK ==
-        GNUNET_CRYPTO_eddsa_verify 
(GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST,
+        GNUNET_CRYPTO_eddsa_verify 
(GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST,
                                     &uhs,
                                     &ub->sender_sig,
                                     &ub->sender.public_key))
@@ -2699,7 +2699,7 @@ mq_send_kx (struct GNUNET_MQ_Handle *mq,
   uc.sender = my_identity;
   uc.monotonic_time =
     GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (cfg));
-  uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE);
+  uhs.purpose.purpose = htonl 
(GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE);
   uhs.purpose.size = htonl (sizeof(uhs));
   uhs.sender = my_identity;
   uhs.receiver = receiver->target;
@@ -3644,7 +3644,7 @@ iface_proc (void *cls,
   bi->salen = addrlen;
   bi->found = GNUNET_YES;
   bi->bcm.sender = my_identity;
-  ubs.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST);
+  ubs.purpose.purpose = htonl 
(GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST);
   ubs.purpose.size = htonl (sizeof(ubs));
   ubs.sender = my_identity;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,

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