aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dns/plugin_block_dns.c2
-rw-r--r--src/exit/gnunet-daemon-exit.c2
-rw-r--r--src/include/block_dns.h2
-rw-r--r--src/pt/gnunet-daemon-pt.c8
4 files changed, 5 insertions, 9 deletions
diff --git a/src/dns/plugin_block_dns.c b/src/dns/plugin_block_dns.c
index c0009dd688..de9185a5ab 100644
--- a/src/dns/plugin_block_dns.c
+++ b/src/dns/plugin_block_dns.c
@@ -93,7 +93,7 @@ block_plugin_dns_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_DNS_RECORD,
&ad->purpose,
&ad->signature,
- &ad->peer))
+ &ad->peer.public_key))
{
GNUNET_break_op (0);
return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c
index 6f6e713621..a758162a7e 100644
--- a/src/exit/gnunet-daemon-exit.c
+++ b/src/exit/gnunet-daemon-exit.c
@@ -3574,7 +3574,7 @@ run (void *cls, char *const *args GNUNET_UNUSED,
dht = GNUNET_DHT_connect (cfg, 1);
peer_key = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg);
GNUNET_CRYPTO_ecc_key_get_public_for_signature (peer_key,
- &dns_advertisement.peer);
+ &dns_advertisement.peer.public_key);
dns_advertisement.purpose.size = htonl (sizeof (struct GNUNET_DNS_Advertisement) -
sizeof (struct GNUNET_CRYPTO_EccSignature));
dns_advertisement.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DNS_RECORD);
diff --git a/src/include/block_dns.h b/src/include/block_dns.h
index 928a951263..650b3bc140 100644
--- a/src/include/block_dns.h
+++ b/src/include/block_dns.h
@@ -53,7 +53,7 @@ struct GNUNET_DNS_Advertisement
/**
* The peer providing this service
*/
- struct GNUNET_CRYPTO_EccPublicSignKey peer;
+ struct GNUNET_PeerIdentity peer;
};
GNUNET_NETWORK_STRUCT_END
diff --git a/src/pt/gnunet-daemon-pt.c b/src/pt/gnunet-daemon-pt.c
index eee851fafb..1d9abf81ad 100644
--- a/src/pt/gnunet-daemon-pt.c
+++ b/src/pt/gnunet-daemon-pt.c
@@ -1193,7 +1193,6 @@ handle_dht_result (void *cls,
size_t size, const void *data)
{
const struct GNUNET_DNS_Advertisement *ad;
- struct GNUNET_PeerIdentity pid;
struct MeshExit *exit;
if (sizeof (struct GNUNET_DNS_Advertisement) != size)
@@ -1202,18 +1201,15 @@ handle_dht_result (void *cls,
return;
}
ad = data;
- GNUNET_CRYPTO_hash (&ad->peer,
- sizeof (struct GNUNET_CRYPTO_EccPublicSignKey),
- &pid.hashPubKey);
for (exit = exit_head; NULL != exit; exit = exit->next)
- if (0 == memcmp (&pid,
+ if (0 == memcmp (&ad->peer,
&exit->peer,
sizeof (struct GNUNET_PeerIdentity)))
break;
if (NULL == exit)
{
exit = GNUNET_new (struct MeshExit);
- exit->peer = pid;
+ exit->peer = ad->peer;
/* tunnel is closed, so insert at the end */
GNUNET_CONTAINER_DLL_insert_tail (exit_head,
exit_tail,