diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-01-09 18:11:58 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-01-09 18:11:58 +0100 |
commit | a327860b118e10e170a9721ea36ba5eeccf2bb8e (patch) | |
tree | b2c7660026fc0944deb5214f6de159fb64add937 /src/core | |
parent | ec19c1e316efdd29a7af0524fc2ff33cc4b19d09 (diff) | |
download | gnunet-a327860b118e10e170a9721ea36ba5eeccf2bb8e.tar.gz gnunet-a327860b118e10e170a9721ea36ba5eeccf2bb8e.zip |
-DHT: implement path signing (but signatures are not yet being verified)
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/gnunet-service-core.c | 16 | ||||
-rw-r--r-- | src/core/gnunet-service-core_kx.c | 7 |
2 files changed, 11 insertions, 12 deletions
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index 8f53072d9..c9c3e3ff5 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c | |||
@@ -271,9 +271,9 @@ GSC_CLIENTS_solicit_request (struct GSC_ClientActiveRequest *car) | |||
271 | GNUNET_CONTAINER_multipeermap_contains (c->connectmap, &car->target)) | 271 | GNUNET_CONTAINER_multipeermap_contains (c->connectmap, &car->target)) |
272 | { | 272 | { |
273 | /* connection has gone down since, drop request */ | 273 | /* connection has gone down since, drop request */ |
274 | GNUNET_assert (0 != memcmp (&car->target, | 274 | GNUNET_assert (0 != |
275 | &GSC_my_identity, | 275 | GNUNET_memcmp (&car->target, |
276 | sizeof(struct GNUNET_PeerIdentity))); | 276 | &GSC_my_identity)); |
277 | GSC_SESSIONS_dequeue_request (car); | 277 | GSC_SESSIONS_dequeue_request (car); |
278 | GSC_CLIENTS_reject_request (car, GNUNET_NO); | 278 | GSC_CLIENTS_reject_request (car, GNUNET_NO); |
279 | return; | 279 | return; |
@@ -314,9 +314,8 @@ handle_client_send_request (void *cls, const struct SendMessageRequest *req) | |||
314 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 314 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
315 | "Client asked for transmission to `%s'\n", | 315 | "Client asked for transmission to `%s'\n", |
316 | GNUNET_i2s (&req->peer)); | 316 | GNUNET_i2s (&req->peer)); |
317 | is_loopback = (0 == memcmp (&req->peer, | 317 | is_loopback = (0 == GNUNET_memcmp (&req->peer, |
318 | &GSC_my_identity, | 318 | &GSC_my_identity)); |
319 | sizeof(struct GNUNET_PeerIdentity))); | ||
320 | if ((! is_loopback) && | 319 | if ((! is_loopback) && |
321 | (GNUNET_YES != | 320 | (GNUNET_YES != |
322 | GNUNET_CONTAINER_multipeermap_contains (c->connectmap, &req->peer))) | 321 | GNUNET_CONTAINER_multipeermap_contains (c->connectmap, &req->peer))) |
@@ -419,9 +418,8 @@ tokenized_cb (void *cls, const struct GNUNET_MessageHeader *message) | |||
419 | gettext_noop ("# bytes of messages of type %u received"), | 418 | gettext_noop ("# bytes of messages of type %u received"), |
420 | (unsigned int) ntohs (message->type)); | 419 | (unsigned int) ntohs (message->type)); |
421 | GNUNET_STATISTICS_update (GSC_stats, buf, ntohs (message->size), GNUNET_NO); | 420 | GNUNET_STATISTICS_update (GSC_stats, buf, ntohs (message->size), GNUNET_NO); |
422 | if (0 == memcmp (&car->target, | 421 | if (0 == GNUNET_memcmp (&car->target, |
423 | &GSC_my_identity, | 422 | &GSC_my_identity)) |
424 | sizeof(struct GNUNET_PeerIdentity))) | ||
425 | { | 423 | { |
426 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 424 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
427 | "Delivering message of type %u to myself\n", | 425 | "Delivering message of type %u to myself\n", |
diff --git a/src/core/gnunet-service-core_kx.c b/src/core/gnunet-service-core_kx.c index a79ef075b..07c346485 100644 --- a/src/core/gnunet-service-core_kx.c +++ b/src/core/gnunet-service-core_kx.c | |||
@@ -1797,8 +1797,8 @@ do_rekey (void *cls) | |||
1797 | int | 1797 | int |
1798 | GSC_KX_init (struct GNUNET_CRYPTO_EddsaPrivateKey *pk) | 1798 | GSC_KX_init (struct GNUNET_CRYPTO_EddsaPrivateKey *pk) |
1799 | { | 1799 | { |
1800 | struct GNUNET_MQ_MessageHandler handlers[] = | 1800 | struct GNUNET_MQ_MessageHandler handlers[] = { |
1801 | { GNUNET_MQ_hd_fixed_size (ephemeral_key, | 1801 | GNUNET_MQ_hd_fixed_size (ephemeral_key, |
1802 | GNUNET_MESSAGE_TYPE_CORE_EPHEMERAL_KEY, | 1802 | GNUNET_MESSAGE_TYPE_CORE_EPHEMERAL_KEY, |
1803 | struct EphemeralKeyMessage, | 1803 | struct EphemeralKeyMessage, |
1804 | NULL), | 1804 | NULL), |
@@ -1814,7 +1814,8 @@ GSC_KX_init (struct GNUNET_CRYPTO_EddsaPrivateKey *pk) | |||
1814 | GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE, | 1814 | GNUNET_MESSAGE_TYPE_CORE_ENCRYPTED_MESSAGE, |
1815 | struct EncryptedMessage, | 1815 | struct EncryptedMessage, |
1816 | NULL), | 1816 | NULL), |
1817 | GNUNET_MQ_handler_end () }; | 1817 | GNUNET_MQ_handler_end () |
1818 | }; | ||
1818 | 1819 | ||
1819 | my_private_key = *pk; | 1820 | my_private_key = *pk; |
1820 | GNUNET_CRYPTO_eddsa_key_get_public (&my_private_key, | 1821 | GNUNET_CRYPTO_eddsa_key_get_public (&my_private_key, |