From 5ae9689165089999037632ce82b3bb921d470bb6 Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Fri, 9 Mar 2012 09:41:46 +0000 Subject: - changes --- src/namestore/Makefile.am | 1 + src/namestore/gnunet-service-namestore.c | 1 - src/namestore/test_namestore_api_lookup.c | 6 +----- src/namestore/test_namestore_api_zone_iteration_stop.c | 7 ++++--- 4 files changed, 6 insertions(+), 9 deletions(-) (limited to 'src') 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 = \ EXTRA_DIST = \ test_namestore_api.conf \ test_plugin_namestore_sqlite.conf\ + test_hostkey \ zonefiles/4UCICULTINKC87UO4326KEEDQ9MTEP2AJT88MJFVGTGNK12QNGMQI2S41VI07UUU6EO19BTB06PDL0HE6VP1OM50HOJEI75RHP4JP80.zone \ zonefiles/KJI3AL00K91EDPFJF58DAJM7H61D189TLP70N56JL8SVDCJE1SJ3SNNBOQPPONTL37FMHPS39SMK2NMVC0GQMGA6QCMHITT78O8GF80.zone 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, memcpy (rd_tmp, rd_ser, rd_ser_len); GNUNET_SERVER_notification_context_unicast (snc, lnc->nc->client, (const struct GNUNET_MessageHeader *) lnr_msg, GNUNET_NO); - GNUNET_free_non_null(signature_new); GNUNET_free (lnr_msg); } 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, size_t rd_ser_len; /* load privat key */ - char *hostkey_file; - GNUNET_asprintf(&hostkey_file,"zonefiles%s%s",DIR_SEPARATOR_STR, "4UCICULTINKC87UO4326KEEDQ9MTEP2AJT88MJFVGTGNK12QNGMQI2S41VI07UUU6EO19BTB06PDL0HE6VP1OM50HOJEI75RHP4JP80.zone"); - GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Using zonekey file `%s' \n", hostkey_file); - privkey = GNUNET_CRYPTO_rsa_key_create_from_file(hostkey_file); - GNUNET_free (hostkey_file); + privkey = GNUNET_CRYPTO_rsa_key_create_from_file("test_hostkey"); GNUNET_assert (privkey != NULL); /* get public key */ 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, { GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Comparing results name %s \n", name); if (0 == strcmp (name, s_name_1)) - { + { /* name_1 */ if (rd_count == 1) { if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_1)) @@ -247,7 +247,7 @@ void zone_proc (void *cls, } } else if (0 == strcmp (name, s_name_2)) - { + { /* name_2 */ if (rd_count == 1) { if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_2)) @@ -261,6 +261,7 @@ void zone_proc (void *cls, failed = GNUNET_YES; GNUNET_break (0); } + GNUNET_assert (GNUNET_OK == GNUNET_NAMESTORE_verify_signature(&pubkey2, s_name_2, rd_count, rd, sig_2)); if (0 != memcmp (signature, sig_2, sizeof (struct GNUNET_CRYPTO_RsaSignature))) { failed = GNUNET_YES; @@ -268,7 +269,7 @@ void zone_proc (void *cls, } } else if (0 == strcmp (name, s_name_3)) - { + { /* name_3 */ if (rd_count == 1) { if (GNUNET_YES != GNUNET_NAMESTORE_records_cmp(rd, s_rd_3)) -- cgit v1.2.3