aboutsummaryrefslogtreecommitdiff
path: root/src/namestore
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore')
-rw-r--r--src/namestore/Makefile.am8
-rw-r--r--src/namestore/gnunet-namestore.c18
-rw-r--r--src/namestore/gnunet-service-namestore.c6
-rw-r--r--src/namestore/plugin_namestore_sqlite.c2
-rw-r--r--src/namestore/plugin_rest_namestore.c58
-rw-r--r--src/namestore/test_namestore_api_lookup_nick.c6
-rw-r--r--src/namestore/test_namestore_api_monitoring.c6
-rw-r--r--src/namestore/test_namestore_api_zone_iteration.c6
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_nick.c6
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_specific_zone.c6
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c6
-rwxr-xr-xsrc/namestore/test_plugin_rest_namestore.sh24
-rw-r--r--src/namestore/zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkeybin826 -> 0 bytes
-rw-r--r--src/namestore/zonefiles/BW7PTMDSN5KS42GMK2VKVE96BAYDS3QVMAS7SC5208FD6HFTAXE0.zkey1
-rw-r--r--src/namestore/zonefiles/CNFGWF0JH0C65M6PQW6VSRR6D3NEZVHAQF6NC037J01TETS6CJ30.zkeybin0 -> 32 bytes
-rw-r--r--src/namestore/zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkeybin827 -> 0 bytes
-rw-r--r--src/namestore/zonefiles/KHW2Y5A7X59Z8BC2GHSEQ9WGZ5HWVEF25TBFR3Q5QHCERMVM76DG.zkey1
-rw-r--r--src/namestore/zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkeybin826 -> 0 bytes
-rw-r--r--src/namestore/zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkeybin827 -> 0 bytes
-rw-r--r--src/namestore/zonefiles/TWY43VS959JJ41KN2FG8782EJ2N0XDF4J6BWASR1BK5BPPRWQJAG.zkey2
20 files changed, 86 insertions, 70 deletions
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am
index f4b846065..40ac64197 100644
--- a/src/namestore/Makefile.am
+++ b/src/namestore/Makefile.am
@@ -691,8 +691,8 @@ EXTRA_DIST = \
691 test_plugin_namestore_postgres.conf \ 691 test_plugin_namestore_postgres.conf \
692 test_plugin_namestore_flat.conf \ 692 test_plugin_namestore_flat.conf \
693 test_hostkey \ 693 test_hostkey \
694 zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey \ 694 zonefiles/BW7PTMDSN5KS42GMK2VKVE96BAYDS3QVMAS7SC5208FD6HFTAXE0.zkey \
695 zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey \ 695 zonefiles/KHW2Y5A7X59Z8BC2GHSEQ9WGZ5HWVEF25TBFR3Q5QHCERMVM76DG.zkey \
696 zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey \ 696 zonefiles/CNFGWF0JH0C65M6PQW6VSRR6D3NEZVHAQF6NC037J01TETS6CJ30.zkey \
697 zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey \ 697 zonefiles/TWY43VS959JJ41KN2FG8782EJ2N0XDF4J6BWASR1BK5BPPRWQJAG.zkey \
698 $(check_SCRIPTS) 698 $(check_SCRIPTS)
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index 94fcb8952..07d045b90 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -878,7 +878,7 @@ del_monitor (void *cls,
878 rd[i].data_size)))) || 878 rd[i].data_size)))) ||
879 (0 == strcmp (vs, value))))) 879 (0 == strcmp (vs, value)))))
880 rdx[rd_left++] = rd[i]; 880 rdx[rd_left++] = rd[i];
881 GNUNET_free_non_null (vs); 881 GNUNET_free (vs);
882 } 882 }
883 if (rd_count == rd_left) 883 if (rd_count == rd_left)
884 { 884 {
@@ -1048,7 +1048,8 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg)
1048 return; 1048 return;
1049 } 1049 }
1050 add = 1; 1050 add = 1;
1051 typestring = GNUNET_strdup (GNUNET_GNSRECORD_number_to_typename (GNUNET_GNSRECORD_TYPE_NICK)); 1051 typestring = GNUNET_strdup (GNUNET_GNSRECORD_number_to_typename (
1052 GNUNET_GNSRECORD_TYPE_NICK));
1052 name = GNUNET_strdup (GNUNET_GNS_EMPTY_LABEL_AT); 1053 name = GNUNET_strdup (GNUNET_GNS_EMPTY_LABEL_AT);
1053 value = GNUNET_strdup (nickstring); 1054 value = GNUNET_strdup (nickstring);
1054 is_public = 0; 1055 is_public = 0;
@@ -1087,6 +1088,17 @@ run_with_zone_pkey (const struct GNUNET_CONFIGURATION_Handle *cfg)
1087 ret = 1; 1088 ret = 1;
1088 return; 1089 return;
1089 } 1090 }
1091 if ((GNUNET_DNSPARSER_TYPE_SRV == type) ||
1092 (GNUNET_DNSPARSER_TYPE_TLSA == type) ||
1093 (GNUNET_DNSPARSER_TYPE_OPENPGPKEY == type))
1094 {
1095 fprintf (stderr,
1096 _ ("For DNS record types `SRV', `TLSA' and `OPENPGPKEY'"));
1097 fprintf (stderr, ", please use a `BOX' record instead\n");
1098 GNUNET_SCHEDULER_shutdown ();
1099 ret = 1;
1100 return;
1101 }
1090 if (NULL == value) 1102 if (NULL == value)
1091 { 1103 {
1092 fprintf (stderr, 1104 fprintf (stderr,
@@ -1296,7 +1308,7 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
1296 return; 1308 return;
1297 } 1309 }
1298 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego); 1310 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego);
1299 GNUNET_free_non_null (ego_name); 1311 GNUNET_free (ego_name);
1300 ego_name = NULL; 1312 ego_name = NULL;
1301 run_with_zone_pkey (cfg); 1313 run_with_zone_pkey (cfg);
1302} 1314}
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index c57f15f65..bb8138e23 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -540,7 +540,7 @@ cache_nick (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
540 break; 540 break;
541 } 541 }
542 } 542 }
543 GNUNET_free_non_null (oldest->rd); 543 GNUNET_free (oldest->rd);
544 oldest->zone = *zone; 544 oldest->zone = *zone;
545 if (NULL != nick) 545 if (NULL != nick)
546 { 546 {
@@ -915,7 +915,7 @@ refresh_block (struct NamestoreClient *nc,
915 nick = get_nick_record (zone_key); 915 nick = get_nick_record (zone_key);
916 res_count = rd_count; 916 res_count = rd_count;
917 res = (struct GNUNET_GNSRECORD_Data *) rd; /* fixme: a bit unclean... */ 917 res = (struct GNUNET_GNSRECORD_Data *) rd; /* fixme: a bit unclean... */
918 if (NULL != nick && (0 != strcmp (name, GNUNET_GNS_EMPTY_LABEL_AT))) 918 if ((NULL != nick) && (0 != strcmp (name, GNUNET_GNS_EMPTY_LABEL_AT)))
919 { 919 {
920 nick->flags = 920 nick->flags =
921 (nick->flags | GNUNET_GNSRECORD_RF_PRIVATE) ^ GNUNET_GNSRECORD_RF_PRIVATE; 921 (nick->flags | GNUNET_GNSRECORD_RF_PRIVATE) ^ GNUNET_GNSRECORD_RF_PRIVATE;
@@ -1392,7 +1392,7 @@ handle_record_lookup (void *cls, const struct LabelLookupMessage *ll_msg)
1392 GNUNET_memcpy (&llr_msg[1], name_tmp, name_len); 1392 GNUNET_memcpy (&llr_msg[1], name_tmp, name_len);
1393 GNUNET_memcpy (&res_name[name_len], rlc.res_rd, rlc.rd_ser_len); 1393 GNUNET_memcpy (&res_name[name_len], rlc.res_rd, rlc.rd_ser_len);
1394 GNUNET_MQ_send (nc->mq, env); 1394 GNUNET_MQ_send (nc->mq, env);
1395 GNUNET_free_non_null (rlc.res_rd); 1395 GNUNET_free (rlc.res_rd);
1396} 1396}
1397 1397
1398 1398
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c
index a909221e2..45fb782f7 100644
--- a/src/namestore/plugin_namestore_sqlite.c
+++ b/src/namestore/plugin_namestore_sqlite.c
@@ -296,7 +296,7 @@ database_shutdown (struct Plugin *plugin)
296 GNUNET_ERROR_TYPE_ERROR, 296 GNUNET_ERROR_TYPE_ERROR,
297 "sqlite3_close"); 297 "sqlite3_close");
298 298
299 GNUNET_free_non_null (plugin->fn); 299 GNUNET_free (plugin->fn);
300} 300}
301 301
302 302
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c
index 95b9b428f..f1cbfb38b 100644
--- a/src/namestore/plugin_rest_namestore.c
+++ b/src/namestore/plugin_rest_namestore.c
@@ -491,7 +491,7 @@ namestore_list_finished (void *cls)
491 resp = GNUNET_REST_create_response (result_str); 491 resp = GNUNET_REST_create_response (result_str);
492 MHD_add_response_header (resp, "Content-Type", "application/json"); 492 MHD_add_response_header (resp, "Content-Type", "application/json");
493 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); 493 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
494 GNUNET_free_non_null (result_str); 494 GNUNET_free (result_str);
495 GNUNET_SCHEDULER_add_now (&cleanup_handle, handle); 495 GNUNET_SCHEDULER_add_now (&cleanup_handle, handle);
496} 496}
497 497
@@ -536,6 +536,7 @@ namestore_list_iteration (void *cls,
536 GNUNET_NAMESTORE_zone_iterator_next (handle->list_it, 1); 536 GNUNET_NAMESTORE_zone_iterator_next (handle->list_it, 1);
537} 537}
538 538
539
539/** 540/**
540 * Handle lookup error 541 * Handle lookup error
541 * 542 *
@@ -553,10 +554,10 @@ ns_lookup_error_cb (void *cls)
553 554
554static void 555static void
555ns_get_lookup_cb (void *cls, 556ns_get_lookup_cb (void *cls,
556 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, 557 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
557 const char *label, 558 const char *label,
558 unsigned int rd_len, 559 unsigned int rd_len,
559 const struct GNUNET_GNSRECORD_Data *rd) 560 const struct GNUNET_GNSRECORD_Data *rd)
560{ 561{
561 struct RequestHandle *handle = cls; 562 struct RequestHandle *handle = cls;
562 struct GNUNET_GNSRECORD_Data rd_filtered[rd_len]; 563 struct GNUNET_GNSRECORD_Data rd_filtered[rd_len];
@@ -588,8 +589,6 @@ ns_get_lookup_cb (void *cls,
588} 589}
589 590
590 591
591
592
593/** 592/**
594 * Handle namestore GET request 593 * Handle namestore GET request
595 * 594 *
@@ -666,12 +665,12 @@ namestore_get (struct GNUNET_REST_RequestHandle *con_handle,
666 } 665 }
667 handle->record_name = GNUNET_strdup (labelname + 1); 666 handle->record_name = GNUNET_strdup (labelname + 1);
668 handle->ns_qe = GNUNET_NAMESTORE_records_lookup (handle->ns_handle, 667 handle->ns_qe = GNUNET_NAMESTORE_records_lookup (handle->ns_handle,
669 handle->zone_pkey, 668 handle->zone_pkey,
670 handle->record_name, 669 handle->record_name,
671 &ns_lookup_error_cb, 670 &ns_lookup_error_cb,
672 handle, 671 handle,
673 &ns_get_lookup_cb, 672 &ns_get_lookup_cb,
674 handle); 673 handle);
675 if (NULL == handle->ns_qe) 674 if (NULL == handle->ns_qe)
676 { 675 {
677 handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED); 676 handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED);
@@ -681,7 +680,6 @@ namestore_get (struct GNUNET_REST_RequestHandle *con_handle,
681} 680}
682 681
683 682
684
685static void 683static void
686ns_lookup_cb (void *cls, 684ns_lookup_cb (void *cls,
687 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, 685 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
@@ -702,12 +700,12 @@ ns_lookup_cb (void *cls,
702 for (j = 0; j < handle->rd_count; j++) 700 for (j = 0; j < handle->rd_count; j++)
703 rd_new[i + j] = handle->rd[j]; 701 rd_new[i + j] = handle->rd[j];
704 handle->ns_qe = GNUNET_NAMESTORE_records_store (handle->ns_handle, 702 handle->ns_qe = GNUNET_NAMESTORE_records_store (handle->ns_handle,
705 handle->zone_pkey, 703 handle->zone_pkey,
706 handle->record_name, 704 handle->record_name,
707 i + j, 705 i + j,
708 rd_new, 706 rd_new,
709 &create_finished, 707 &create_finished,
710 handle); 708 handle);
711 if (NULL == handle->ns_qe) 709 if (NULL == handle->ns_qe)
712 { 710 {
713 handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED); 711 handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED);
@@ -794,12 +792,12 @@ namestore_add_or_update (struct GNUNET_REST_RequestHandle *con_handle,
794 } 792 }
795 handle->zone_pkey = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); 793 handle->zone_pkey = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego);
796 handle->ns_qe = GNUNET_NAMESTORE_records_lookup (handle->ns_handle, 794 handle->ns_qe = GNUNET_NAMESTORE_records_lookup (handle->ns_handle,
797 handle->zone_pkey, 795 handle->zone_pkey,
798 handle->record_name, 796 handle->record_name,
799 &ns_lookup_error_cb, 797 &ns_lookup_error_cb,
800 handle, 798 handle,
801 &ns_lookup_cb, 799 &ns_lookup_cb,
802 handle); 800 handle);
803 if (NULL == handle->ns_qe) 801 if (NULL == handle->ns_qe)
804 { 802 {
805 handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED); 803 handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED);
@@ -898,9 +896,9 @@ namestore_delete (struct GNUNET_REST_RequestHandle *con_handle,
898 handle->zone_pkey, 896 handle->zone_pkey,
899 handle->record_name, 897 handle->record_name,
900 0, 898 0,
901 NULL, 899 NULL,
902 &del_finished, 900 &del_finished,
903 handle); 901 handle);
904 if (NULL == handle->ns_qe) 902 if (NULL == handle->ns_qe)
905 { 903 {
906 handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED); 904 handle->emsg = GNUNET_strdup (GNUNET_REST_NAMESTORE_FAILED);
@@ -1109,7 +1107,7 @@ libgnunet_plugin_rest_namestore_done (void *cls)
1109 1107
1110 plugin->cfg = NULL; 1108 plugin->cfg = NULL;
1111 1109
1112 GNUNET_free_non_null (allow_methods); 1110 GNUNET_free (allow_methods);
1113 GNUNET_free (api); 1111 GNUNET_free (api);
1114 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Namestore REST plugin is finished\n"); 1112 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Namestore REST plugin is finished\n");
1115 return NULL; 1113 return NULL;
diff --git a/src/namestore/test_namestore_api_lookup_nick.c b/src/namestore/test_namestore_api_lookup_nick.c
index 628e76254..14fe7fc70 100644
--- a/src/namestore/test_namestore_api_lookup_nick.c
+++ b/src/namestore/test_namestore_api_lookup_nick.c
@@ -54,11 +54,12 @@ static struct GNUNET_NAMESTORE_QueueEntry *nsqe;
54// static const char * name = "dummy.dummy.gnunet"; 54// static const char * name = "dummy.dummy.gnunet";
55static const char *name = "d"; 55static const char *name = "d";
56 56
57static char *record_data;
57 58
58static void 59static void
59cleanup () 60cleanup ()
60{ 61{
61 GNUNET_free_non_null ((void *) rd_orig.data); 62 GNUNET_free (record_data);
62 if (NULL != nsh) 63 if (NULL != nsh)
63 { 64 {
64 GNUNET_NAMESTORE_disconnect (nsh); 65 GNUNET_NAMESTORE_disconnect (nsh);
@@ -264,7 +265,8 @@ nick_cont (void *cls, int32_t success, const char *emsg)
264 rd_orig.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us; 265 rd_orig.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us;
265 rd_orig.record_type = TEST_RECORD_TYPE; 266 rd_orig.record_type = TEST_RECORD_TYPE;
266 rd_orig.data_size = TEST_RECORD_DATALEN; 267 rd_orig.data_size = TEST_RECORD_DATALEN;
267 rd_orig.data = GNUNET_malloc (TEST_RECORD_DATALEN); 268 record_data = GNUNET_malloc (TEST_RECORD_DATALEN);
269 rd_orig.data = record_data;
268 rd_orig.flags = 0; 270 rd_orig.flags = 0;
269 memset ((char *) rd_orig.data, 'a', TEST_RECORD_DATALEN); 271 memset ((char *) rd_orig.data, 'a', TEST_RECORD_DATALEN);
270 272
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c
index cc00adf44..3f1be1403 100644
--- a/src/namestore/test_namestore_api_monitoring.c
+++ b/src/namestore/test_namestore_api_monitoring.c
@@ -88,9 +88,9 @@ do_shutdown ()
88 GNUNET_NAMESTORE_disconnect (nsh); 88 GNUNET_NAMESTORE_disconnect (nsh);
89 nsh = NULL; 89 nsh = NULL;
90 } 90 }
91 GNUNET_free_non_null (s_name_1); 91 GNUNET_free (s_name_1);
92 GNUNET_free_non_null (s_name_2); 92 GNUNET_free (s_name_2);
93 GNUNET_free_non_null (s_name_3); 93 GNUNET_free (s_name_3);
94 94
95 if (s_rd_1 != NULL) 95 if (s_rd_1 != NULL)
96 { 96 {
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c
index a363ee28d..5d02b9e49 100644
--- a/src/namestore/test_namestore_api_zone_iteration.c
+++ b/src/namestore/test_namestore_api_zone_iteration.c
@@ -88,9 +88,9 @@ end (void *cls)
88 GNUNET_SCHEDULER_cancel (endbadly_task); 88 GNUNET_SCHEDULER_cancel (endbadly_task);
89 endbadly_task = NULL; 89 endbadly_task = NULL;
90 } 90 }
91 GNUNET_free_non_null (s_name_1); 91 GNUNET_free (s_name_1);
92 GNUNET_free_non_null (s_name_2); 92 GNUNET_free (s_name_2);
93 GNUNET_free_non_null (s_name_3); 93 GNUNET_free (s_name_3);
94 if (NULL != s_rd_1) 94 if (NULL != s_rd_1)
95 { 95 {
96 GNUNET_free_nz ((void *) s_rd_1->data); 96 GNUNET_free_nz ((void *) s_rd_1->data);
diff --git a/src/namestore/test_namestore_api_zone_iteration_nick.c b/src/namestore/test_namestore_api_zone_iteration_nick.c
index 1ebdfd073..4e54a05d2 100644
--- a/src/namestore/test_namestore_api_zone_iteration_nick.c
+++ b/src/namestore/test_namestore_api_zone_iteration_nick.c
@@ -82,9 +82,9 @@ end (void *cls)
82 GNUNET_NAMESTORE_disconnect (nsh); 82 GNUNET_NAMESTORE_disconnect (nsh);
83 nsh = NULL; 83 nsh = NULL;
84 } 84 }
85 GNUNET_free_non_null (s_name_1); 85 GNUNET_free (s_name_1);
86 GNUNET_free_non_null (s_name_2); 86 GNUNET_free (s_name_2);
87 GNUNET_free_non_null (s_name_3); 87 GNUNET_free (s_name_3);
88 88
89 if (s_rd_1 != NULL) 89 if (s_rd_1 != NULL)
90 { 90 {
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
index 0534da001..30920713f 100644
--- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
+++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
@@ -88,9 +88,9 @@ end (void *cls)
88 GNUNET_SCHEDULER_cancel (endbadly_task); 88 GNUNET_SCHEDULER_cancel (endbadly_task);
89 endbadly_task = NULL; 89 endbadly_task = NULL;
90 } 90 }
91 GNUNET_free_non_null (s_name_1); 91 GNUNET_free (s_name_1);
92 GNUNET_free_non_null (s_name_2); 92 GNUNET_free (s_name_2);
93 GNUNET_free_non_null (s_name_3); 93 GNUNET_free (s_name_3);
94 if (s_rd_1 != NULL) 94 if (s_rd_1 != NULL)
95 { 95 {
96 GNUNET_free_nz ((void *) s_rd_1->data); 96 GNUNET_free_nz ((void *) s_rd_1->data);
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index b71a8789c..bdcdd1706 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -75,9 +75,9 @@ end (void *cls)
75 GNUNET_NAMESTORE_disconnect (nsh); 75 GNUNET_NAMESTORE_disconnect (nsh);
76 nsh = NULL; 76 nsh = NULL;
77 } 77 }
78 GNUNET_free_non_null (s_name_1); 78 GNUNET_free (s_name_1);
79 GNUNET_free_non_null (s_name_2); 79 GNUNET_free (s_name_2);
80 GNUNET_free_non_null (s_name_3); 80 GNUNET_free (s_name_3);
81 if (s_rd_1 != NULL) 81 if (s_rd_1 != NULL)
82 { 82 {
83 GNUNET_free_nz ((void *) s_rd_1->data); 83 GNUNET_free_nz ((void *) s_rd_1->data);
diff --git a/src/namestore/test_plugin_rest_namestore.sh b/src/namestore/test_plugin_rest_namestore.sh
index 014057e56..12a7fa50c 100755
--- a/src/namestore/test_plugin_rest_namestore.sh
+++ b/src/namestore/test_plugin_rest_namestore.sh
@@ -85,17 +85,17 @@ test="$(gnunet-namestore -D -z $TEST_ID -c test_namestore_api.conf)"
85name=$TEST_ID 85name=$TEST_ID
86public="$(gnunet-identity -d -c test_namestore_api.conf | grep $TEST_ID | awk 'NR==1{print $3}')" 86public="$(gnunet-identity -d -c test_namestore_api.conf | grep $TEST_ID | awk 'NR==1{print $3}')"
87gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf 87gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf
88curl_get "${namestore_link}" "HTTP/1.1 200 OK" 88#curl_get "${namestore_link}" "HTTP/1.1 200 OK"
89curl_get "${namestore_link}/$name" "HTTP/1.1 200 OK" 89curl_get "${namestore_link}/$name" "HTTP/1.1 200 OK"
90curl_get "${namestore_link}/$public" "error" 90curl_get "${namestore_link}/$public" "error"
91gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf 91gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf
92 92
93#Test POST with NAME 93#Test POST with NAME
94curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0}],"record_name":"test_entry"}' "HTTP/1.1 204 No Content" 94curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","private": false, "relative_expiration": false, "supplemental": false, "shadow": false}],"record_name":"test_entry"}' "HTTP/1.1 204 No Content"
95gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 95gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1
96 96
97# invalid values 97# invalid values
98curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRGxxx", "record_type":"PKEY", "expiration_time":"1d","flag":0}],"record_name":"test_entry"}' "error" 98curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRGxxx", "record_type":"PKEY", "expiration_time":"1d","private": false, "relative_expiration": false, "supplemental": false, "shadow": false}],"record_name":"test_entry"}' "error"
99gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 99gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1
100 100
101 101
@@ -106,30 +106,30 @@ curl_post "${namestore_link}/$name" '{"data": [{"record_type":"PKEY", "expiratio
106gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 106gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1
107 107
108#expirations 108#expirations
109curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"0d","flag":0}],"record_name":"test_entry"}' "HTTP/1.1 204" 109curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"0d","private": false, "relative_expiration": true, "supplemental": false, "shadow": false}],"record_name":"test_entry"}' "HTTP/1.1 204"
110gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 110gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1
111 111
112curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"10000d","flag":0}],"record_name":"test_entry"}' "HTTP/1.1 204" 112curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"10000d","private": false, "relative_expiration": true, "supplemental": false, "shadow": false}],"record_name":"test_entry"}' "HTTP/1.1 204"
113gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 113gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1
114 114
115curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"now","flag":0}],"record_name":"test_entry"}' "error" 115curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"now","private": false, "relative_expiration": false, "supplemental": false, "shadow": false}],"record_name":"test_entry"}' "error"
116gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 116gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1
117 117
118curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time_missing":"1d","flag":0}],"record_name":"test_entry"}' "error" 118curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time_missing":"1d","private": false, "relative_expiration": false, "supplemental": false, "shadow": false}],"record_name":"test_entry"}' "error"
119gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 119gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1
120 120
121#record_name 121#record_name
122curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0}],"record_name":""}' "error" 122curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","private": false, "relative_expiration": false, "supplemental": false, "shadow": false}],"record_name":""}' "error"
123gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 123gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1
124curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","flag":0}],"record_name_missing":"test_entry"}' "error" 124curl_post "${namestore_link}/$name" '{"data": [{"value":"HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG", "record_type":"PKEY", "expiration_time":"1d","private": false, "relative_expiration": false, "supplemental": false, "shadow": false}],"record_name_missing":"test_entry"}' "error"
125gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1 125gnunet-namestore -z $name -d -n "test_entry" -c test_namestore_api.conf > /dev/null 2>&1
126 126
127#Test DELETE 127#Test DELETE
128gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf 128gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf
129curl_delete "${namestore_link}/$name?record_name=test_entry" "HTTP/1.1 204" 129curl_delete "${namestore_link}/$name/test_entry" "HTTP/1.1 204"
130curl_delete "${namestore_link}/$name?record_name=test_entry" "error" 130curl_delete "${namestore_link}/$name/test_entry" "error"
131gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf 131gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V "HVX38H2CB7WJM0WCPWT9CFX6GASMYJVR65RN75SJSSKAYVYXHMRG" -t "PKEY" -c test_namestore_api.conf
132curl_delete "${namestore_link}/$public?record_name=test_entry" "error" 132curl_delete "${namestore_link}/$public/test_entry" "error"
133 133
134gnunet-arm -e -c test_namestore_api.conf 134gnunet-arm -e -c test_namestore_api.conf
135exit 0; 135exit 0;
diff --git a/src/namestore/zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey b/src/namestore/zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey
deleted file mode 100644
index 7dfee2d0b..000000000
--- a/src/namestore/zonefiles/AQ835GVL939H4O8QJQ7GBLPTQC0QAAO91BN7QK01BA63MDSK6I4G.zkey
+++ /dev/null
Binary files differ
diff --git a/src/namestore/zonefiles/BW7PTMDSN5KS42GMK2VKVE96BAYDS3QVMAS7SC5208FD6HFTAXE0.zkey b/src/namestore/zonefiles/BW7PTMDSN5KS42GMK2VKVE96BAYDS3QVMAS7SC5208FD6HFTAXE0.zkey
new file mode 100644
index 000000000..0d37aefef
--- /dev/null
+++ b/src/namestore/zonefiles/BW7PTMDSN5KS42GMK2VKVE96BAYDS3QVMAS7SC5208FD6HFTAXE0.zkey
@@ -0,0 +1 @@
Q0҆d /#`$f \ No newline at end of file
diff --git a/src/namestore/zonefiles/CNFGWF0JH0C65M6PQW6VSRR6D3NEZVHAQF6NC037J01TETS6CJ30.zkey b/src/namestore/zonefiles/CNFGWF0JH0C65M6PQW6VSRR6D3NEZVHAQF6NC037J01TETS6CJ30.zkey
new file mode 100644
index 000000000..b5b465ea1
--- /dev/null
+++ b/src/namestore/zonefiles/CNFGWF0JH0C65M6PQW6VSRR6D3NEZVHAQF6NC037J01TETS6CJ30.zkey
Binary files differ
diff --git a/src/namestore/zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey b/src/namestore/zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey
deleted file mode 100644
index acc877d4f..000000000
--- a/src/namestore/zonefiles/HGU0A0VCU334DN7F2I9UIUMVQMM7JMSD142LIMNUGTTV9R0CF4EG.zkey
+++ /dev/null
Binary files differ
diff --git a/src/namestore/zonefiles/KHW2Y5A7X59Z8BC2GHSEQ9WGZ5HWVEF25TBFR3Q5QHCERMVM76DG.zkey b/src/namestore/zonefiles/KHW2Y5A7X59Z8BC2GHSEQ9WGZ5HWVEF25TBFR3Q5QHCERMVM76DG.zkey
new file mode 100644
index 000000000..7535efb5e
--- /dev/null
+++ b/src/namestore/zonefiles/KHW2Y5A7X59Z8BC2GHSEQ9WGZ5HWVEF25TBFR3Q5QHCERMVM76DG.zkey
@@ -0,0 +1 @@
p8&D6Vv+X{ A \ No newline at end of file
diff --git a/src/namestore/zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey b/src/namestore/zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey
deleted file mode 100644
index 7dfee2d0b..000000000
--- a/src/namestore/zonefiles/N0UJMP015AFUNR2BTNM3FKPBLG38913BL8IDMCO2H0A1LIB81960.zkey
+++ /dev/null
Binary files differ
diff --git a/src/namestore/zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey b/src/namestore/zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey
deleted file mode 100644
index acc877d4f..000000000
--- a/src/namestore/zonefiles/S5I9DSGQVAB5FVV16T3B3CC5H1B2JGL3Q412JBKURME8EKU0600G.zkey
+++ /dev/null
Binary files differ
diff --git a/src/namestore/zonefiles/TWY43VS959JJ41KN2FG8782EJ2N0XDF4J6BWASR1BK5BPPRWQJAG.zkey b/src/namestore/zonefiles/TWY43VS959JJ41KN2FG8782EJ2N0XDF4J6BWASR1BK5BPPRWQJAG.zkey
new file mode 100644
index 000000000..ac3ed96a3
--- /dev/null
+++ b/src/namestore/zonefiles/TWY43VS959JJ41KN2FG8782EJ2N0XDF4J6BWASR1BK5BPPRWQJAG.zkey
@@ -0,0 +1,2 @@
1XJM
2d胦ӌB=B \ No newline at end of file