summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2022-01-06 15:32:56 +0100
committert3sserakt <t3ss@posteo.de>2022-01-06 15:34:01 +0100
commit85697ed9ad40cdeffc642ccd6d63811cbd91c9b1 (patch)
tree003058a75af2e861f9a70d633292c3d40c1b5a1e /src/transport
parentd65ae53a5abf9388a0cc6a27e705af331fa5069e (diff)
parentf59876f79b520f174161a40928ddbba1fab87215 (diff)
Merge branch 'master' of ssh://git.gnunet.org/gnunet
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-communicator-tcp.c30
-rw-r--r--src/transport/gnunet-communicator-udp.c20
2 files changed, 25 insertions, 25 deletions
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,