2 This file is part of GNUnet.
3 (C) 2012, 2013, 2014 Christian Grothoff (and other contributing authors)
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
21 * @file gnunet-namestore.c
22 * @brief command line tool to manipulate the local zone
23 * @author Christian Grothoff
29 #include <gnunet_util_lib.h>
30 #include <gnunet_dnsparser_lib.h>
31 #include <gnunet_identity_service.h>
32 #include <gnunet_gnsrecord_lib.h>
33 #include <gnunet_gns_service.h>
34 #include <gnunet_namestore_service.h>
38 * Handle to the namestore.
40 static struct GNUNET_NAMESTORE_Handle *ns;
43 * Private key for the our zone.
45 static struct GNUNET_CRYPTO_EcdsaPrivateKey zone_pkey;
48 * Handle to identity lookup.
50 static struct GNUNET_IDENTITY_EgoLookup *el;
53 * Identity service handle
55 static struct GNUNET_IDENTITY_Handle *idh;
60 struct GNUNET_IDENTITY_Operation *get_default;
63 * Name of the ego controlling the zone.
65 static char *ego_name;
68 * Desired action is to add a record.
73 * Queue entry for the 'add-uri' operation.
75 static struct GNUNET_NAMESTORE_QueueEntry *add_qe_uri;
78 * Queue entry for the 'add' operation.
80 static struct GNUNET_NAMESTORE_QueueEntry *add_qe;
83 * Queue entry for the 'reverse lookup' operation (in combination with a name).
85 static struct GNUNET_NAMESTORE_QueueEntry *reverse_qe;
88 * Desired action is to list records.
93 * List iterator for the 'list' operation.
95 static struct GNUNET_NAMESTORE_ZoneIterator *list_it;
98 * Desired action is to remove a record.
103 * Is record public (opposite of #GNUNET_GNSRECORD_RF_PRIVATE)
105 static int is_public;
108 * Is record a shadow record (#GNUNET_GNSRECORD_RF_SHADOW_RECORD)
110 static int is_shadow;
113 * Is record pending approval (#GNUNET_GNSRECORD_RF_PENDING)
115 static int is_pending;
118 * Queue entry for the 'del' operation.
120 static struct GNUNET_NAMESTORE_QueueEntry *del_qe;
123 * Name of the records to add/list/remove.
128 * Value of the record to add/remove.
138 * Reverse lookup to perform.
140 static char *reverse_pkey;
143 * Type of the record to add/remove, NULL to remove all.
145 static char *typestring;
148 * Desired expiration time.
150 static char *expirationstring;
155 static char *nickstring;
158 * Global return value
163 * Type string converted to DNS type value.
165 static uint32_t type;
168 * Value in binary format.
173 * Number of bytes in 'data'.
175 static size_t data_size;
178 * Expirationstring converted to relative time.
180 static struct GNUNET_TIME_Relative etime_rel;
183 * Expirationstring converted to absolute time.
185 static struct GNUNET_TIME_Absolute etime_abs;
188 * Is expiration time relative or absolute time?
190 static int etime_is_rel = GNUNET_SYSERR;
195 static struct GNUNET_NAMESTORE_ZoneMonitor *zm;
198 * Enables monitor mode.
204 * Task run on shutdown. Cleans up everything.
207 * @param tc scheduler context
210 do_shutdown (void *cls,
211 const struct GNUNET_SCHEDULER_TaskContext *tc)
213 if (NULL != get_default)
215 GNUNET_IDENTITY_cancel (get_default);
220 GNUNET_IDENTITY_disconnect (idh);
225 GNUNET_IDENTITY_ego_lookup_cancel (el);
230 GNUNET_NAMESTORE_zone_iteration_stop (list_it);
235 GNUNET_NAMESTORE_cancel (add_qe);
238 if (NULL != add_qe_uri)
240 GNUNET_NAMESTORE_cancel (add_qe_uri);
245 GNUNET_NAMESTORE_cancel (del_qe);
250 GNUNET_NAMESTORE_disconnect (ns);
253 memset (&zone_pkey, 0, sizeof (zone_pkey));
261 GNUNET_NAMESTORE_zone_monitor_stop (zm);
273 * Check if we are finished, and if so, perform shutdown.
278 if ( (NULL == add_qe) &&
279 (NULL == add_qe_uri) &&
281 (NULL == reverse_qe) &&
283 GNUNET_SCHEDULER_shutdown ();
288 * Continuation called to notify client about result of the
291 * @param cls closure, location of the QueueEntry pointer to NULL out
292 * @param success #GNUNET_SYSERR on failure (including timeout/queue drop/failure to validate)
293 * #GNUNET_NO if content was already there
294 * #GNUNET_YES (or other positive value) on success
295 * @param emsg NULL on success, otherwise an error message
298 add_continuation (void *cls,
302 struct GNUNET_NAMESTORE_QueueEntry **qe = cls;
305 if (GNUNET_YES != success)
308 _("Adding record failed: %s\n"),
309 (GNUNET_NO == success) ? "record exists" : emsg);
310 if (GNUNET_NO != success)
319 * Continuation called to notify client about result of the
322 * @param cls closure, unused
323 * @param success #GNUNET_SYSERR on failure (including timeout/queue drop/failure to validate)
324 * #GNUNET_NO if content was already there
325 * #GNUNET_YES (or other positive value) on success
326 * @param emsg NULL on success, otherwise an error message
329 del_continuation (void *cls,
334 if (GNUNET_NO == success)
337 _("Deleting record failed, record does not exist%s%s\n"),
338 (NULL != emsg) ? ": " : "",
339 (NULL != emsg) ? emsg : "");
341 if (GNUNET_SYSERR == success)
344 _("Deleting record failed%s%s\n"),
345 (NULL != emsg) ? ": " : "",
346 (NULL != emsg) ? emsg : "");
353 * Process a record that was stored in the namestore.
356 * @param zone_key private key of the zone
357 * @param rname name that is being mapped (at most 255 characters long)
358 * @param rd_len number of entries in @a rd array
359 * @param rd array of records with data to store
362 display_record (void *cls,
363 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
366 const struct GNUNET_GNSRECORD_Data *rd)
368 const char *typestring;
372 struct GNUNET_TIME_Absolute at;
373 struct GNUNET_TIME_Relative rt;
381 if ( (NULL != name) &&
382 (0 != strcmp (name, rname)) )
384 GNUNET_NAMESTORE_zone_iterator_next (list_it);
390 for (i=0;i<rd_len;i++)
392 if ( (GNUNET_GNSRECORD_TYPE_NICK == rd[i].record_type) &&
396 typestring = GNUNET_GNSRECORD_number_to_typename (rd[i].record_type);
397 s = GNUNET_GNSRECORD_value_to_string (rd[i].record_type,
402 FPRINTF (stdout, _("\tCorrupt or unsupported record of type %u\n"),
403 (unsigned int) rd[i].record_type);
406 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION))
408 rt.rel_value_us = rd[i].expiration_time;
409 ets = GNUNET_STRINGS_relative_time_to_string (rt, GNUNET_YES);
413 at.abs_value_us = rd[i].expiration_time;
414 ets = GNUNET_STRINGS_absolute_time_to_string (at);
417 "\t%s: %s (%s)\t%s\t%s\t%s\n",
421 (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_PRIVATE)) ? "PRIVATE" : "PUBLIC",
422 (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_SHADOW_RECORD)) ? "SHADOW" : "",
423 (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_PENDING)) ? "PENDING" : "");
426 FPRINTF (stdout, "%s", "\n");
427 GNUNET_NAMESTORE_zone_iterator_next (list_it);
432 * Function called once we are in sync in monitor mode.
439 FPRINTF (stdout, "%s", "Monitor is now in sync.\n");
444 * We're storing a record; this function is given the existing record
445 * so that we can merge the information.
447 * @param cls closure, unused
448 * @param zone_key private key of the zone
449 * @param rec_name name that is being mapped (at most 255 characters long)
450 * @param rd_count number of entries in @a rd array
451 * @param rd array of records with data to store
454 get_existing_record (void *cls,
455 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
456 const char *rec_name,
457 unsigned int rd_count,
458 const struct GNUNET_GNSRECORD_Data *rd)
460 struct GNUNET_GNSRECORD_Data rdn[rd_count + 1];
461 struct GNUNET_GNSRECORD_Data *rde;
465 if ( (NULL != zone_key) &&
466 (0 != strcmp (rec_name, name)) )
474 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
475 "Received %u records for name `%s'\n",
477 for (i=0;i<rd_count;i++)
479 switch (rd[i].record_type)
481 case GNUNET_DNSPARSER_TYPE_CNAME:
483 _("A %s record exists already under `%s', no other records can be added.\n"),
489 case GNUNET_GNSRECORD_TYPE_PKEY:
491 _("A %s record exists already under `%s', no other records can be added.\n"),
496 case GNUNET_GNSRECORD_TYPE_GNS2DNS:
498 _("A %s record exists already under `%s', no other records can be added.\n"),
508 case GNUNET_DNSPARSER_TYPE_CNAME:
512 _("Records already exist under `%s', cannot add `%s' record.\n"),
520 case GNUNET_GNSRECORD_TYPE_PKEY:
524 _("Records already exist under `%s', cannot add `%s' record.\n"),
532 case GNUNET_GNSRECORD_TYPE_GNS2DNS:
536 _("Records already exist under `%s', cannot add `%s' record.\n"),
545 memset (rdn, 0, sizeof (struct GNUNET_GNSRECORD_Data));
546 memcpy (&rdn[1], rd, rd_count * sizeof (struct GNUNET_GNSRECORD_Data));
549 rde->data_size = data_size;
550 rde->record_type = type;
552 rde->flags |= GNUNET_GNSRECORD_RF_SHADOW_RECORD;
554 rde->flags |= GNUNET_GNSRECORD_RF_PRIVATE;
556 rde->flags |= GNUNET_GNSRECORD_RF_PENDING;
557 if (GNUNET_YES == etime_is_rel)
559 rde->expiration_time = etime_rel.rel_value_us;
560 rde->flags |= GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
562 else if (GNUNET_NO == etime_is_rel)
563 rde->expiration_time = etime_abs.abs_value_us;
565 rde->expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
566 GNUNET_assert (NULL != name);
567 add_qe = GNUNET_NAMESTORE_records_store (ns,
578 * Function called with the result of our attempt to obtain a name for a given
582 * @param zone private key of the zone; NULL on disconnect
583 * @param label label of the records; NULL on disconnect
584 * @param rd_count number of entries in @a rd array, 0 if label was deleted
585 * @param rd array of records with data to store
588 handle_reverse_lookup (void *cls,
589 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
591 unsigned int rd_count,
592 const struct GNUNET_GNSRECORD_Data *rd)
608 * We were asked to delete something; this function is called with
609 * the existing records. Now we should determine what should be
610 * deleted and then issue the deletion operation.
613 * @param zone private key of the zone we are deleting from
614 * @param label name of the records we are editing
615 * @param rd_count size of the @a rd array
616 * @param rd existing records
619 del_monitor (void *cls,
620 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
622 unsigned int rd_count,
623 const struct GNUNET_GNSRECORD_Data *rd)
625 struct GNUNET_GNSRECORD_Data rdx[rd_count];
626 unsigned int rd_left;
635 _("There are no records under label `%s' that could be deleted.\n"),
640 if ( (NULL == value) &&
641 (NULL == typestring) )
643 /* delete everything */
644 del_qe = GNUNET_NAMESTORE_records_store (ns,
653 if (NULL != typestring)
654 type = GNUNET_GNSRECORD_typename_to_number (typestring);
656 type = GNUNET_GNSRECORD_TYPE_ANY;
657 for (i=0;i<rd_count;i++)
660 if (! ( ( (GNUNET_GNSRECORD_TYPE_ANY == type) ||
661 (rd[i].record_type == type) ) &&
663 (NULL == (vs = (GNUNET_GNSRECORD_value_to_string (rd[i].record_type,
665 rd[i].data_size)))) ||
666 (0 == strcmp (vs, value)) ) ) )
667 rdx[rd_left++] = rd[i];
668 GNUNET_free_non_null (vs);
670 if (rd_count == rd_left)
672 /* nothing got deleted */
674 _("There are no records under label `%s' that match the request for deletion.\n"),
679 /* delete everything but what we copied to 'rdx' */
680 del_qe = GNUNET_NAMESTORE_records_store (ns,
690 * Function called with the result from the check if the namestore
691 * service is actually running. If it is, we start the actual
694 * @param cls closure with our configuration
695 * @param result #GNUNET_YES if the namestore service is running
698 testservice_task (void *cls,
701 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
702 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
703 struct GNUNET_GNSRECORD_Data rd;
705 if (GNUNET_YES != result)
707 FPRINTF (stderr, _("Service `%s' is not running\n"),
711 if (! (add|del|list|(NULL != nickstring)|(NULL != uri)|(NULL != reverse_pkey)) )
713 /* nothing more to be done */
715 _("No options given\n"));
716 GNUNET_SCHEDULER_shutdown ();
719 GNUNET_CRYPTO_ecdsa_key_get_public (&zone_pkey,
722 ns = GNUNET_NAMESTORE_connect (cfg);
725 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
726 _("Failed to connect to namestore\n"));
734 _("Missing option `%s' for operation `%s'\n"),
736 GNUNET_SCHEDULER_shutdown ();
740 if (NULL == typestring)
743 _("Missing option `%s' for operation `%s'\n"),
745 GNUNET_SCHEDULER_shutdown ();
749 type = GNUNET_GNSRECORD_typename_to_number (typestring);
750 if (UINT32_MAX == type)
752 fprintf (stderr, _("Unsupported type `%s'\n"), typestring);
753 GNUNET_SCHEDULER_shutdown ();
760 _("Missing option `%s' for operation `%s'\n"),
763 GNUNET_SCHEDULER_shutdown ();
767 GNUNET_GNSRECORD_string_to_value (type,
772 fprintf (stderr, _("Value `%s' invalid for record type `%s'\n"),
775 GNUNET_SCHEDULER_shutdown ();
779 if (NULL == expirationstring)
782 _("Missing option `%s' for operation `%s'\n"),
784 GNUNET_SCHEDULER_shutdown ();
788 if (0 == strcmp (expirationstring, "never"))
790 etime_abs = GNUNET_TIME_UNIT_FOREVER_ABS;
791 etime_is_rel = GNUNET_NO;
793 else if (GNUNET_OK ==
794 GNUNET_STRINGS_fancy_time_to_relative (expirationstring,
797 etime_is_rel = GNUNET_YES;
799 else if (GNUNET_OK ==
800 GNUNET_STRINGS_fancy_time_to_absolute (expirationstring,
803 etime_is_rel = GNUNET_NO;
808 _("Invalid time format `%s'\n"),
810 GNUNET_SCHEDULER_shutdown ();
814 add_qe = GNUNET_NAMESTORE_records_lookup (ns, &zone_pkey, name,
815 &get_existing_record, NULL );
822 _("Missing option `%s' for operation `%s'\n"),
824 GNUNET_SCHEDULER_shutdown ();
828 del_qe = GNUNET_NAMESTORE_records_lookup (ns,
836 list_it = GNUNET_NAMESTORE_zone_iteration_start (ns,
841 if (NULL != reverse_pkey)
843 struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
846 GNUNET_CRYPTO_ecdsa_public_key_from_string (reverse_pkey,
847 strlen (reverse_pkey),
851 _("Invalid public key for reverse lookup `%s'\n"),
853 GNUNET_SCHEDULER_shutdown ();
855 reverse_qe = GNUNET_NAMESTORE_zone_to_name (ns,
858 &handle_reverse_lookup,
865 struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
867 GNUNET_STRINGS_utf8_tolower (uri, uri);
868 if ( (2 != (sscanf (uri,
869 "gnunet://gns/%52s/%63s",
872 (GNUNET_OK != GNUNET_CRYPTO_ecdsa_public_key_from_string (sh, strlen (sh), &pkey)) )
875 _("Invalid URI `%s'\n"),
877 GNUNET_SCHEDULER_shutdown ();
881 memset (&rd, 0, sizeof (rd));
883 rd.data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey);
884 rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY;
885 if (GNUNET_YES == etime_is_rel)
887 rd.expiration_time = etime_rel.rel_value_us;
888 rd.flags |= GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
890 else if (GNUNET_NO == etime_is_rel)
891 rd.expiration_time = etime_abs.abs_value_us;
893 rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
896 rd.flags |= GNUNET_GNSRECORD_RF_SHADOW_RECORD;
897 add_qe_uri = GNUNET_NAMESTORE_records_store (ns,
905 if (NULL != nickstring)
907 if (0 == strlen(nickstring))
910 _("Invalid nick `%s'\n"),
912 GNUNET_SCHEDULER_shutdown ();
916 add_qe_uri = GNUNET_NAMESTORE_set_nick(ns, &zone_pkey, nickstring,
917 &add_continuation, &add_qe_uri);
921 zm = GNUNET_NAMESTORE_zone_monitor_start (cfg,
932 * Callback invoked from identity service with ego information.
933 * An @a ego of NULL means the ego was not found.
935 * @param cls closure with the configuration
936 * @param ego an ego known to identity service, or NULL
939 identity_cb (void *cls,
940 const struct GNUNET_IDENTITY_Ego *ego)
942 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
947 if (NULL != ego_name)
950 _("Ego `%s' not known to identity service\n"),
953 GNUNET_SCHEDULER_shutdown ();
957 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego);
958 GNUNET_free_non_null (ego_name);
960 GNUNET_CLIENT_service_test ("namestore", cfg,
961 GNUNET_TIME_UNIT_SECONDS,
968 default_ego_cb (void *cls,
969 struct GNUNET_IDENTITY_Ego *ego,
977 _("No default ego configured in identity service\n"));
978 GNUNET_SCHEDULER_shutdown ();
984 identity_cb (cls, ego);
990 id_connect_cb (void *cls,
991 struct GNUNET_IDENTITY_Ego *ego,
995 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
999 get_default = GNUNET_IDENTITY_get (idh,
1001 &default_ego_cb, (void *) cfg);
1007 testservice_id_task (void *cls, int result)
1009 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
1010 if (result != GNUNET_YES)
1013 _("Identity service is not running\n"));
1014 GNUNET_SCHEDULER_shutdown ();
1018 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
1019 &do_shutdown, (void *) cfg);
1021 if (NULL == ego_name)
1023 idh = GNUNET_IDENTITY_connect (cfg, &id_connect_cb, (void *) cfg);
1025 fprintf (stderr, _("Cannot connect to identity service\n"));
1029 el = GNUNET_IDENTITY_ego_lookup (cfg,
1037 * Main function that will be run.
1039 * @param cls closure
1040 * @param args remaining command-line arguments
1041 * @param cfgfile name of the configuration file used (for saving, can be NULL!)
1042 * @param cfg configuration
1045 run (void *cls, char *const *args, const char *cfgfile,
1046 const struct GNUNET_CONFIGURATION_Handle *cfg)
1048 if ( (NULL != args[0]) && (NULL == uri) )
1049 uri = GNUNET_strdup (args[0]);
1051 GNUNET_CLIENT_service_test ("identity", cfg,
1052 GNUNET_TIME_UNIT_SECONDS,
1053 &testservice_id_task,
1059 * The main function for gnunet-namestore.
1061 * @param argc number of arguments from the command line
1062 * @param argv command line arguments
1063 * @return 0 ok, 1 on error
1066 main (int argc, char *const *argv)
1072 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
1074 gettext_noop ("add record"), 0,
1075 &GNUNET_GETOPT_set_one, &add},
1076 {'d', "delete", NULL,
1077 gettext_noop ("delete record"), 0,
1078 &GNUNET_GETOPT_set_one, &del},
1079 {'D', "display", NULL,
1080 gettext_noop ("display records"), 0,
1081 &GNUNET_GETOPT_set_one, &list},
1082 {'e', "expiration", "TIME",
1083 gettext_noop ("expiration time for record to use (for adding only), \"never\" is possible"), 1,
1084 &GNUNET_GETOPT_set_string, &expirationstring},
1085 {'i', "nick", "NICKNAME",
1086 gettext_noop ("set the desired nick name for the zone"), 1,
1087 &GNUNET_GETOPT_set_string, &nickstring},
1088 {'m', "monitor", NULL,
1089 gettext_noop ("monitor changes in the namestore"), 0,
1090 &GNUNET_GETOPT_set_one, &monitor},
1091 {'n', "name", "NAME",
1092 gettext_noop ("name of the record to add/delete/display"), 1,
1093 &GNUNET_GETOPT_set_string, &name},
1094 {'r', "reverse", "PKEY",
1095 gettext_noop ("determine our name for the given PKEY"), 1,
1096 &GNUNET_GETOPT_set_string, &reverse_pkey},
1097 {'t', "type", "TYPE",
1098 gettext_noop ("type of the record to add/delete/display"), 1,
1099 &GNUNET_GETOPT_set_string, &typestring},
1101 gettext_noop ("URI to import into our zone"), 1,
1102 &GNUNET_GETOPT_set_string, &uri},
1103 {'V', "value", "VALUE",
1104 gettext_noop ("value of the record to add/delete"), 1,
1105 &GNUNET_GETOPT_set_string, &value},
1106 {'p', "public", NULL,
1107 gettext_noop ("create or list public record"), 0,
1108 &GNUNET_GETOPT_set_one, &is_public},
1109 {'P', "pending", NULL,
1110 gettext_noop ("create record that is pending approval (and thus for now inactive)"), 0,
1111 &GNUNET_GETOPT_set_one, &is_pending},
1112 {'s', "shadow", NULL,
1113 gettext_noop ("create shadow record (only valid if all other records of the same type have expired"), 0,
1114 &GNUNET_GETOPT_set_one, &is_shadow},
1115 {'z', "zone", "EGO",
1116 gettext_noop ("name of the ego controlling the zone"), 1,
1117 &GNUNET_GETOPT_set_string, &ego_name},
1118 GNUNET_GETOPT_OPTION_END
1121 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
1124 GNUNET_log_setup ("gnunet-namestore", "WARNING", NULL);
1126 GNUNET_PROGRAM_run (argc, argv, "gnunet-namestore",
1127 _("GNUnet zone manipulation tool"),
1131 GNUNET_free ((void*) argv);
1132 GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey);
1135 GNUNET_free ((void*) argv);
1136 GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey);
1140 /* end of gnunet-namestore.c */