From: Christian Grothoff Date: Mon, 30 Sep 2013 22:10:54 +0000 (+0000) Subject: -fixing build issues in pt/exit/vpn related to #3047 X-Git-Tag: initial-import-from-subversion-38251~6925 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a0feef53d9f3a04c65a870e2a2b9f8b850bedc0a;p=oweals%2Fgnunet.git -fixing build issues in pt/exit/vpn related to #3047 --- diff --git a/src/dns/plugin_block_dns.c b/src/dns/plugin_block_dns.c index c0009dd68..de9185a5a 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 6f6e71362..a758162a7 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 928a95126..650b3bc14 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 eee851faf..1d9abf81a 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,