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);
/**
* The peer providing this service
*/
- struct GNUNET_CRYPTO_EccPublicSignKey peer;
+ struct GNUNET_PeerIdentity peer;
};
GNUNET_NETWORK_STRUCT_END
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)
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,