aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-communicator-udp.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-01-04 15:53:29 +0100
committerMartin Schanzenbach <schanzen@gnunet.org>2022-01-04 15:53:29 +0100
commita5ca7d5975c65bdfdc02087cf54ea88f1fdf4bd7 (patch)
tree9b7e2698b29380c6cd5eb3cfc3b0666649dd2b5d /src/transport/gnunet-communicator-udp.c
parent7b6e0eb4f6e731a2e22509aa846da58f0553a866 (diff)
downloadgnunet-a5ca7d5975c65bdfdc02087cf54ea88f1fdf4bd7.tar.gz
gnunet-a5ca7d5975c65bdfdc02087cf54ea88f1fdf4bd7.zip
BUILD: gnunet-signatures from gana
Diffstat (limited to 'src/transport/gnunet-communicator-udp.c')
-rw-r--r--src/transport/gnunet-communicator-udp.c20
1 files changed, 10 insertions, 10 deletions
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
164struct UdpHandshakeSignature 164struct UdpHandshakeSignature
165{ 165{
166 /** 166 /**
167 * Purpose must be #GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE 167 * Purpose must be #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE
168 */ 168 */
169 struct GNUNET_CRYPTO_EccSignaturePurpose purpose; 169 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
170 170
@@ -227,7 +227,7 @@ struct UDPConfirmation
227 struct GNUNET_PeerIdentity sender; 227 struct GNUNET_PeerIdentity sender;
228 228
229 /** 229 /**
230 * Sender's signature of type #GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE 230 * Sender's signature of type #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE
231 */ 231 */
232 struct GNUNET_CRYPTO_EddsaSignature sender_sig; 232 struct GNUNET_CRYPTO_EddsaSignature sender_sig;
233 233
@@ -284,7 +284,7 @@ struct UDPAck
284struct UdpBroadcastSignature 284struct UdpBroadcastSignature
285{ 285{
286 /** 286 /**
287 * Purpose must be #GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST 287 * Purpose must be #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST
288 */ 288 */
289 struct GNUNET_CRYPTO_EccSignaturePurpose purpose; 289 struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
290 290
@@ -315,7 +315,7 @@ struct UDPBroadcast
315 315
316 /** 316 /**
317 * Sender's signature of type 317 * Sender's signature of type
318 * #GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST 318 * #GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST
319 */ 319 */
320 struct GNUNET_CRYPTO_EddsaSignature sender_sig; 320 struct GNUNET_CRYPTO_EddsaSignature sender_sig;
321}; 321};
@@ -2202,14 +2202,14 @@ verify_confirmation (const struct GNUNET_CRYPTO_EcdhePublicKey *ephemeral,
2202{ 2202{
2203 struct UdpHandshakeSignature uhs; 2203 struct UdpHandshakeSignature uhs;
2204 2204
2205 uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE); 2205 uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE);
2206 uhs.purpose.size = htonl (sizeof(uhs)); 2206 uhs.purpose.size = htonl (sizeof(uhs));
2207 uhs.sender = uc->sender; 2207 uhs.sender = uc->sender;
2208 uhs.receiver = my_identity; 2208 uhs.receiver = my_identity;
2209 uhs.ephemeral = *ephemeral; 2209 uhs.ephemeral = *ephemeral;
2210 uhs.monotonic_time = uc->monotonic_time; 2210 uhs.monotonic_time = uc->monotonic_time;
2211 return GNUNET_CRYPTO_eddsa_verify ( 2211 return GNUNET_CRYPTO_eddsa_verify (
2212 GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE, 2212 GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE,
2213 &uhs, 2213 &uhs,
2214 &uc->sender_sig, 2214 &uc->sender_sig,
2215 &uc->sender.public_key); 2215 &uc->sender.public_key);
@@ -2350,7 +2350,7 @@ sock_read (void *cls)
2350 "received UDPBroadcast from %s\n", 2350 "received UDPBroadcast from %s\n",
2351 GNUNET_a2s ((const struct sockaddr *) addr_verify, salen)); 2351 GNUNET_a2s ((const struct sockaddr *) addr_verify, salen));
2352 ub = (const struct UDPBroadcast *) buf; 2352 ub = (const struct UDPBroadcast *) buf;
2353 uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST); 2353 uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST);
2354 uhs.purpose.size = htonl (sizeof(uhs)); 2354 uhs.purpose.size = htonl (sizeof(uhs));
2355 uhs.sender = ub->sender; 2355 uhs.sender = ub->sender;
2356 sender = ub->sender; 2356 sender = ub->sender;
@@ -2366,7 +2366,7 @@ sock_read (void *cls)
2366 GNUNET_i2s (&sender)); 2366 GNUNET_i2s (&sender));
2367 GNUNET_CRYPTO_hash ((struct sockaddr *) addr_verify, salen, &uhs.h_address); 2367 GNUNET_CRYPTO_hash ((struct sockaddr *) addr_verify, salen, &uhs.h_address);
2368 if (GNUNET_OK == 2368 if (GNUNET_OK ==
2369 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST, 2369 GNUNET_CRYPTO_eddsa_verify (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST,
2370 &uhs, 2370 &uhs,
2371 &ub->sender_sig, 2371 &ub->sender_sig,
2372 &ub->sender.public_key)) 2372 &ub->sender.public_key))
@@ -2699,7 +2699,7 @@ mq_send_kx (struct GNUNET_MQ_Handle *mq,
2699 uc.sender = my_identity; 2699 uc.sender = my_identity;
2700 uc.monotonic_time = 2700 uc.monotonic_time =
2701 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (cfg)); 2701 GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get_monotonic (cfg));
2702 uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_UDP_HANDSHAKE); 2702 uhs.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_HANDSHAKE);
2703 uhs.purpose.size = htonl (sizeof(uhs)); 2703 uhs.purpose.size = htonl (sizeof(uhs));
2704 uhs.sender = my_identity; 2704 uhs.sender = my_identity;
2705 uhs.receiver = receiver->target; 2705 uhs.receiver = receiver->target;
@@ -3644,7 +3644,7 @@ iface_proc (void *cls,
3644 bi->salen = addrlen; 3644 bi->salen = addrlen;
3645 bi->found = GNUNET_YES; 3645 bi->found = GNUNET_YES;
3646 bi->bcm.sender = my_identity; 3646 bi->bcm.sender = my_identity;
3647 ubs.purpose.purpose = htonl (GNUNET_SIGNATURE_COMMUNICATOR_UDP_BROADCAST); 3647 ubs.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_COMMUNICATOR_UDP_BROADCAST);
3648 ubs.purpose.size = htonl (sizeof(ubs)); 3648 ubs.purpose.size = htonl (sizeof(ubs));
3649 ubs.sender = my_identity; 3649 ubs.sender = my_identity;
3650 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3650 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,