diff options
-rw-r--r-- | src/dns/plugin_block_dns.c | 2 | ||||
-rw-r--r-- | src/exit/gnunet-daemon-exit.c | 2 | ||||
-rw-r--r-- | src/include/block_dns.h | 2 | ||||
-rw-r--r-- | src/pt/gnunet-daemon-pt.c | 8 |
4 files changed, 5 insertions, 9 deletions
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, | |||
93 | GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_DNS_RECORD, | 93 | GNUNET_CRYPTO_ecc_verify (GNUNET_SIGNATURE_PURPOSE_DNS_RECORD, |
94 | &ad->purpose, | 94 | &ad->purpose, |
95 | &ad->signature, | 95 | &ad->signature, |
96 | &ad->peer)) | 96 | &ad->peer.public_key)) |
97 | { | 97 | { |
98 | GNUNET_break_op (0); | 98 | GNUNET_break_op (0); |
99 | return GNUNET_BLOCK_EVALUATION_RESULT_INVALID; | 99 | 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, | |||
3574 | dht = GNUNET_DHT_connect (cfg, 1); | 3574 | dht = GNUNET_DHT_connect (cfg, 1); |
3575 | peer_key = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg); | 3575 | peer_key = GNUNET_CRYPTO_ecc_key_create_from_configuration (cfg); |
3576 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (peer_key, | 3576 | GNUNET_CRYPTO_ecc_key_get_public_for_signature (peer_key, |
3577 | &dns_advertisement.peer); | 3577 | &dns_advertisement.peer.public_key); |
3578 | dns_advertisement.purpose.size = htonl (sizeof (struct GNUNET_DNS_Advertisement) - | 3578 | dns_advertisement.purpose.size = htonl (sizeof (struct GNUNET_DNS_Advertisement) - |
3579 | sizeof (struct GNUNET_CRYPTO_EccSignature)); | 3579 | sizeof (struct GNUNET_CRYPTO_EccSignature)); |
3580 | dns_advertisement.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_DNS_RECORD); | 3580 | 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 | |||
53 | /** | 53 | /** |
54 | * The peer providing this service | 54 | * The peer providing this service |
55 | */ | 55 | */ |
56 | struct GNUNET_CRYPTO_EccPublicSignKey peer; | 56 | struct GNUNET_PeerIdentity peer; |
57 | 57 | ||
58 | }; | 58 | }; |
59 | GNUNET_NETWORK_STRUCT_END | 59 | 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, | |||
1193 | size_t size, const void *data) | 1193 | size_t size, const void *data) |
1194 | { | 1194 | { |
1195 | const struct GNUNET_DNS_Advertisement *ad; | 1195 | const struct GNUNET_DNS_Advertisement *ad; |
1196 | struct GNUNET_PeerIdentity pid; | ||
1197 | struct MeshExit *exit; | 1196 | struct MeshExit *exit; |
1198 | 1197 | ||
1199 | if (sizeof (struct GNUNET_DNS_Advertisement) != size) | 1198 | if (sizeof (struct GNUNET_DNS_Advertisement) != size) |
@@ -1202,18 +1201,15 @@ handle_dht_result (void *cls, | |||
1202 | return; | 1201 | return; |
1203 | } | 1202 | } |
1204 | ad = data; | 1203 | ad = data; |
1205 | GNUNET_CRYPTO_hash (&ad->peer, | ||
1206 | sizeof (struct GNUNET_CRYPTO_EccPublicSignKey), | ||
1207 | &pid.hashPubKey); | ||
1208 | for (exit = exit_head; NULL != exit; exit = exit->next) | 1204 | for (exit = exit_head; NULL != exit; exit = exit->next) |
1209 | if (0 == memcmp (&pid, | 1205 | if (0 == memcmp (&ad->peer, |
1210 | &exit->peer, | 1206 | &exit->peer, |
1211 | sizeof (struct GNUNET_PeerIdentity))) | 1207 | sizeof (struct GNUNET_PeerIdentity))) |
1212 | break; | 1208 | break; |
1213 | if (NULL == exit) | 1209 | if (NULL == exit) |
1214 | { | 1210 | { |
1215 | exit = GNUNET_new (struct MeshExit); | 1211 | exit = GNUNET_new (struct MeshExit); |
1216 | exit->peer = pid; | 1212 | exit->peer = ad->peer; |
1217 | /* tunnel is closed, so insert at the end */ | 1213 | /* tunnel is closed, so insert at the end */ |
1218 | GNUNET_CONTAINER_DLL_insert_tail (exit_head, | 1214 | GNUNET_CONTAINER_DLL_insert_tail (exit_head, |
1219 | exit_tail, | 1215 | exit_tail, |