diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-09 09:41:46 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-03-09 09:41:46 +0000 |
commit | 5ae9689165089999037632ce82b3bb921d470bb6 (patch) | |
tree | 4e7504fea930d85a95333e4f8334fc203432e701 /src | |
parent | 0b0770065d84c2a6079c2033dd74ee7c751e88f6 (diff) | |
download | gnunet-5ae9689165089999037632ce82b3bb921d470bb6.tar.gz gnunet-5ae9689165089999037632ce82b3bb921d470bb6.zip |
- changes
Diffstat (limited to 'src')
-rw-r--r-- | src/namestore/Makefile.am | 1 | ||||
-rw-r--r-- | src/namestore/gnunet-service-namestore.c | 1 | ||||
-rw-r--r-- | src/namestore/test_namestore_api_lookup.c | 6 | ||||
-rw-r--r-- | src/namestore/test_namestore_api_zone_iteration_stop.c | 7 |
4 files changed, 6 insertions, 9 deletions
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am index 7a54bb7d8..3fac6dce9 100644 --- a/src/namestore/Makefile.am +++ b/src/namestore/Makefile.am | |||
@@ -193,6 +193,7 @@ test_namestore_record_serialization_LDADD = \ | |||
193 | EXTRA_DIST = \ | 193 | EXTRA_DIST = \ |
194 | test_namestore_api.conf \ | 194 | test_namestore_api.conf \ |
195 | test_plugin_namestore_sqlite.conf\ | 195 | test_plugin_namestore_sqlite.conf\ |
196 | test_hostkey \ | ||
196 | zonefiles/4UCICULTINKC87UO4326KEEDQ9MTEP2AJT88MJFVGTGNK12QNGMQI2S41VI07UUU6EO19BTB06PDL0HE6VP1OM50HOJEI75RHP4JP80.zone \ | 197 | zonefiles/4UCICULTINKC87UO4326KEEDQ9MTEP2AJT88MJFVGTGNK12QNGMQI2S41VI07UUU6EO19BTB06PDL0HE6VP1OM50HOJEI75RHP4JP80.zone \ |
197 | zonefiles/KJI3AL00K91EDPFJF58DAJM7H61D189TLP70N56JL8SVDCJE1SJ3SNNBOQPPONTL37FMHPS39SMK2NMVC0GQMGA6QCMHITT78O8GF80.zone | 198 | zonefiles/KJI3AL00K91EDPFJF58DAJM7H61D189TLP70N56JL8SVDCJE1SJ3SNNBOQPPONTL37FMHPS39SMK2NMVC0GQMGA6QCMHITT78O8GF80.zone |
198 | 199 | ||
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c index 6a7082156..749fb30d9 100644 --- a/src/namestore/gnunet-service-namestore.c +++ b/src/namestore/gnunet-service-namestore.c | |||
@@ -487,7 +487,6 @@ handle_lookup_name_it (void *cls, | |||
487 | memcpy (rd_tmp, rd_ser, rd_ser_len); | 487 | memcpy (rd_tmp, rd_ser, rd_ser_len); |
488 | 488 | ||
489 | GNUNET_SERVER_notification_context_unicast (snc, lnc->nc->client, (const struct GNUNET_MessageHeader *) lnr_msg, GNUNET_NO); | 489 | GNUNET_SERVER_notification_context_unicast (snc, lnc->nc->client, (const struct GNUNET_MessageHeader *) lnr_msg, GNUNET_NO); |
490 | GNUNET_free_non_null(signature_new); | ||
491 | GNUNET_free (lnr_msg); | 490 | GNUNET_free (lnr_msg); |
492 | } | 491 | } |
493 | 492 | ||
diff --git a/src/namestore/test_namestore_api_lookup.c b/src/namestore/test_namestore_api_lookup.c index 17477294a..47bc9b672 100644 --- a/src/namestore/test_namestore_api_lookup.c +++ b/src/namestore/test_namestore_api_lookup.c | |||
@@ -256,11 +256,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
256 | size_t rd_ser_len; | 256 | size_t rd_ser_len; |
257 | 257 | ||
258 | /* load privat key */ | 258 | /* load privat key */ |
259 | char *hostkey_file; | 259 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file("test_hostkey"); |
260 | GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, "4UCICULTINKC87UO4326KEEDQ9MTEP2AJT88MJFVGTGNK12QNGMQI2S41VI07UUU6EO19BTB06PDL0HE6VP1OM50HOJEI75RHP4JP80.zone"); | ||
261 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); | ||
262 | privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); | ||
263 | GNUNET_free (hostkey_file); | ||
264 | GNUNET_assert (privkey != NULL); | 260 | GNUNET_assert (privkey != NULL); |
265 | /* get public key */ | 261 | /* get public key */ |
266 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); | 262 | GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey); |
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c index 4093ff3bb..ef55df62f 100644 --- a/src/namestore/test_namestore_api_zone_iteration_stop.c +++ b/src/namestore/test_namestore_api_zone_iteration_stop.c | |||
@@ -226,7 +226,7 @@ void zone_proc (void *cls, | |||
226 | { | 226 | { |
227 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Comparing results name %s \n", name); | 227 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Comparing results name %s \n", name); |
228 | if (0 == strcmp (name, s_name_1)) | 228 | if (0 == strcmp (name, s_name_1)) |
229 | { | 229 | { /* name_1 */ |
230 | if (rd_count == 1) | 230 | if (rd_count == 1) |
231 | { | 231 | { |
232 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_1)) | 232 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_1)) |
@@ -247,7 +247,7 @@ void zone_proc (void *cls, | |||
247 | } | 247 | } |
248 | } | 248 | } |
249 | else if (0 == strcmp (name, s_name_2)) | 249 | else if (0 == strcmp (name, s_name_2)) |
250 | { | 250 | { /* name_2 */ |
251 | if (rd_count == 1) | 251 | if (rd_count == 1) |
252 | { | 252 | { |
253 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_2)) | 253 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_2)) |
@@ -261,6 +261,7 @@ void zone_proc (void *cls, | |||
261 | failed = GNUNET_YES; | 261 | failed = GNUNET_YES; |
262 | GNUNET_break (0); | 262 | GNUNET_break (0); |
263 | } | 263 | } |
264 | GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_verify_signature(&pubkey2, s_name_2, rd_count, rd, sig_2)); | ||
264 | if (0 != memcmp (signature, sig_2, sizeof (struct GNUNET_CRYPTO_RsaSignature))) | 265 | if (0 != memcmp (signature, sig_2, sizeof (struct GNUNET_CRYPTO_RsaSignature))) |
265 | { | 266 | { |
266 | failed = GNUNET_YES; | 267 | failed = GNUNET_YES; |
@@ -268,7 +269,7 @@ void zone_proc (void *cls, | |||
268 | } | 269 | } |
269 | } | 270 | } |
270 | else if (0 == strcmp (name, s_name_3)) | 271 | else if (0 == strcmp (name, s_name_3)) |
271 | { | 272 | { /* name_3 */ |
272 | if (rd_count == 1) | 273 | if (rd_count == 1) |
273 | { | 274 | { |
274 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_3)) | 275 | if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_3)) |