2 This file is part of GNUnet.
3 Copyright (C) 2012, 2013, 2014 GNUnet e.V.
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., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, 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 * Queue entry for the 'del' operation.
115 static struct GNUNET_NAMESTORE_QueueEntry *del_qe;
118 * Name of the records to add/list/remove.
123 * Value of the record to add/remove.
133 * Reverse lookup to perform.
135 static char *reverse_pkey;
138 * Type of the record to add/remove, NULL to remove all.
140 static char *typestring;
143 * Desired expiration time.
145 static char *expirationstring;
150 static char *nickstring;
153 * Global return value
158 * Type string converted to DNS type value.
160 static uint32_t type;
163 * Value in binary format.
168 * Number of bytes in 'data'.
170 static size_t data_size;
173 * Expirationstring converted to relative time.
175 static struct GNUNET_TIME_Relative etime_rel;
178 * Expirationstring converted to absolute time.
180 static struct GNUNET_TIME_Absolute etime_abs;
183 * Is expiration time relative or absolute time?
185 static int etime_is_rel = GNUNET_SYSERR;
190 static struct GNUNET_NAMESTORE_ZoneMonitor *zm;
193 * Enables monitor mode.
199 * Task run on shutdown. Cleans up everything.
204 do_shutdown (void *cls)
206 if (NULL != get_default)
208 GNUNET_IDENTITY_cancel (get_default);
213 GNUNET_IDENTITY_disconnect (idh);
218 GNUNET_IDENTITY_ego_lookup_cancel (el);
223 GNUNET_NAMESTORE_zone_iteration_stop (list_it);
228 GNUNET_NAMESTORE_cancel (add_qe);
231 if (NULL != add_qe_uri)
233 GNUNET_NAMESTORE_cancel (add_qe_uri);
238 GNUNET_NAMESTORE_cancel (del_qe);
243 GNUNET_NAMESTORE_disconnect (ns);
246 memset (&zone_pkey, 0, sizeof (zone_pkey));
254 GNUNET_NAMESTORE_zone_monitor_stop (zm);
266 * Check if we are finished, and if so, perform shutdown.
271 if ( (NULL == add_qe) &&
272 (NULL == add_qe_uri) &&
274 (NULL == reverse_qe) &&
276 GNUNET_SCHEDULER_shutdown ();
281 * Continuation called to notify client about result of the
284 * @param cls closure, location of the QueueEntry pointer to NULL out
285 * @param success #GNUNET_SYSERR on failure (including timeout/queue drop/failure to validate)
286 * #GNUNET_NO if content was already there
287 * #GNUNET_YES (or other positive value) on success
288 * @param emsg NULL on success, otherwise an error message
291 add_continuation (void *cls,
295 struct GNUNET_NAMESTORE_QueueEntry **qe = cls;
298 if (GNUNET_YES != success)
301 _("Adding record failed: %s\n"),
302 (GNUNET_NO == success) ? "record exists" : emsg);
303 if (GNUNET_NO != success)
312 * Continuation called to notify client about result of the
315 * @param cls closure, unused
316 * @param success #GNUNET_SYSERR on failure (including timeout/queue drop/failure to validate)
317 * #GNUNET_NO if content was already there
318 * #GNUNET_YES (or other positive value) on success
319 * @param emsg NULL on success, otherwise an error message
322 del_continuation (void *cls,
327 if (GNUNET_NO == success)
330 _("Deleting record failed, record does not exist%s%s\n"),
331 (NULL != emsg) ? ": " : "",
332 (NULL != emsg) ? emsg : "");
334 if (GNUNET_SYSERR == success)
337 _("Deleting record failed%s%s\n"),
338 (NULL != emsg) ? ": " : "",
339 (NULL != emsg) ? emsg : "");
346 * Function called when we are done with a zone iteration.
349 zone_iteration_finished (void *cls)
357 * Function called when we encountered an error in a zone iteration.
360 zone_iteration_error_cb (void *cls)
364 "Error iterating over zone\n");
371 * Process a record that was stored in the namestore.
374 * @param zone_key private key of the zone
375 * @param rname name that is being mapped (at most 255 characters long)
376 * @param rd_len number of entries in @a rd array
377 * @param rd array of records with data to store
380 display_record (void *cls,
381 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
384 const struct GNUNET_GNSRECORD_Data *rd)
386 const char *typestring;
390 struct GNUNET_TIME_Absolute at;
391 struct GNUNET_TIME_Relative rt;
393 if ( (NULL != name) &&
394 (0 != strcmp (name, rname)) )
396 GNUNET_NAMESTORE_zone_iterator_next (list_it);
402 for (i=0;i<rd_len;i++)
404 if ( (GNUNET_GNSRECORD_TYPE_NICK == rd[i].record_type) &&
408 typestring = GNUNET_GNSRECORD_number_to_typename (rd[i].record_type);
409 s = GNUNET_GNSRECORD_value_to_string (rd[i].record_type,
415 _("\tCorrupt or unsupported record of type %u\n"),
416 (unsigned int) rd[i].record_type);
419 if (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION))
421 rt.rel_value_us = rd[i].expiration_time;
422 ets = GNUNET_STRINGS_relative_time_to_string (rt, GNUNET_YES);
426 at.abs_value_us = rd[i].expiration_time;
427 ets = GNUNET_STRINGS_absolute_time_to_string (at);
430 "\t%s: %s (%s)\t%s\t%s\n",
434 (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_PRIVATE)) ? "PRIVATE" : "PUBLIC",
435 (0 != (rd[i].flags & GNUNET_GNSRECORD_RF_SHADOW_RECORD)) ? "SHADOW" : "");
438 FPRINTF (stdout, "%s", "\n");
439 GNUNET_NAMESTORE_zone_iterator_next (list_it);
444 * Function called once we are in sync in monitor mode.
451 FPRINTF (stdout, "%s", "Monitor is now in sync.\n");
456 * Function called on errors while monitoring.
461 monitor_error_cb (void *cls)
463 FPRINTF (stderr, "%s", "Monitor disconnected and out of sync.\n");
468 * Function called if lookup fails.
471 lookup_error_cb (void *cls)
481 * We're storing a record; this function is given the existing record
482 * so that we can merge the information.
484 * @param cls closure, unused
485 * @param zone_key private key of the zone
486 * @param rec_name name that is being mapped (at most 255 characters long)
487 * @param rd_count number of entries in @a rd array
488 * @param rd array of records with data to store
491 get_existing_record (void *cls,
492 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key,
493 const char *rec_name,
494 unsigned int rd_count,
495 const struct GNUNET_GNSRECORD_Data *rd)
497 struct GNUNET_GNSRECORD_Data rdn[rd_count + 1];
498 struct GNUNET_GNSRECORD_Data *rde;
502 if (0 != strcmp (rec_name, name))
510 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
511 "Received %u records for name `%s'\n",
513 for (i=0;i<rd_count;i++)
515 switch (rd[i].record_type)
517 case GNUNET_DNSPARSER_TYPE_CNAME:
519 _("A %s record exists already under `%s', no other records can be added.\n"),
525 case GNUNET_GNSRECORD_TYPE_PKEY:
527 _("A %s record exists already under `%s', no other records can be added.\n"),
533 case GNUNET_GNSRECORD_TYPE_GNS2DNS:
535 _("A %s record exists already under `%s', no other records can be added.\n"),
545 case GNUNET_DNSPARSER_TYPE_CNAME:
549 _("Records already exist under `%s', cannot add `%s' record.\n"),
557 case GNUNET_GNSRECORD_TYPE_PKEY:
561 _("Records already exist under `%s', cannot add `%s' record.\n"),
569 case GNUNET_GNSRECORD_TYPE_GNS2DNS:
573 _("Records already exist under `%s', cannot add `%s' record.\n"),
582 memset (rdn, 0, sizeof (struct GNUNET_GNSRECORD_Data));
583 GNUNET_memcpy (&rdn[1],
585 rd_count * sizeof (struct GNUNET_GNSRECORD_Data));
588 rde->data_size = data_size;
589 rde->record_type = type;
591 rde->flags |= GNUNET_GNSRECORD_RF_SHADOW_RECORD;
593 rde->flags |= GNUNET_GNSRECORD_RF_PRIVATE;
594 if (GNUNET_YES == etime_is_rel)
596 rde->expiration_time = etime_rel.rel_value_us;
597 rde->flags |= GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
599 else if (GNUNET_NO == etime_is_rel)
600 rde->expiration_time = etime_abs.abs_value_us;
602 rde->expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
603 GNUNET_assert (NULL != name);
604 add_qe = GNUNET_NAMESTORE_records_store (ns,
615 * Function called if we encountered an error in zone-to-name.
618 reverse_error_cb (void *cls)
628 * Function called with the result of our attempt to obtain a name for a given
632 * @param zone private key of the zone; NULL on disconnect
633 * @param label label of the records; NULL on disconnect
634 * @param rd_count number of entries in @a rd array, 0 if label was deleted
635 * @param rd array of records with data to store
638 handle_reverse_lookup (void *cls,
639 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
641 unsigned int rd_count,
642 const struct GNUNET_GNSRECORD_Data *rd)
658 * Function called if lookup for deletion fails.
661 del_lookup_error_cb (void *cls)
671 * We were asked to delete something; this function is called with
672 * the existing records. Now we should determine what should be
673 * deleted and then issue the deletion operation.
676 * @param zone private key of the zone we are deleting from
677 * @param label name of the records we are editing
678 * @param rd_count size of the @a rd array
679 * @param rd existing records
682 del_monitor (void *cls,
683 const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
685 unsigned int rd_count,
686 const struct GNUNET_GNSRECORD_Data *rd)
688 struct GNUNET_GNSRECORD_Data rdx[rd_count];
689 unsigned int rd_left;
698 _("There are no records under label `%s' that could be deleted.\n"),
704 if ( (NULL == value) &&
705 (NULL == typestring) )
707 /* delete everything */
708 del_qe = GNUNET_NAMESTORE_records_store (ns,
718 if (NULL != typestring)
719 type = GNUNET_GNSRECORD_typename_to_number (typestring);
721 type = GNUNET_GNSRECORD_TYPE_ANY;
722 for (i=0;i<rd_count;i++)
725 if (! ( ( (GNUNET_GNSRECORD_TYPE_ANY == type) ||
726 (rd[i].record_type == type) ) &&
728 (NULL == (vs = (GNUNET_GNSRECORD_value_to_string (rd[i].record_type,
730 rd[i].data_size)))) ||
731 (0 == strcmp (vs, value)) ) ) )
732 rdx[rd_left++] = rd[i];
733 GNUNET_free_non_null (vs);
735 if (rd_count == rd_left)
737 /* nothing got deleted */
739 _("There are no records under label `%s' that match the request for deletion.\n"),
744 /* delete everything but what we copied to 'rdx' */
745 del_qe = GNUNET_NAMESTORE_records_store (ns,
756 * Function called with the result from the check if the namestore
757 * service is actually running. If it is, we start the actual
760 * @param cls closure with our configuration
761 * @param result #GNUNET_YES if the namestore service is running
764 testservice_task (void *cls,
767 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
768 struct GNUNET_CRYPTO_EcdsaPublicKey pub;
769 struct GNUNET_GNSRECORD_Data rd;
771 if (GNUNET_YES != result)
773 FPRINTF (stderr, _("Service `%s' is not running\n"),
777 if (! (add|del|list|(NULL != nickstring)|(NULL != uri)|(NULL != reverse_pkey)) )
779 /* nothing more to be done */
781 _("No options given\n"));
782 GNUNET_SCHEDULER_shutdown ();
785 GNUNET_CRYPTO_ecdsa_key_get_public (&zone_pkey,
788 ns = GNUNET_NAMESTORE_connect (cfg);
791 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
792 _("Failed to connect to namestore\n"));
800 _("Missing option `%s' for operation `%s'\n"),
802 GNUNET_SCHEDULER_shutdown ();
806 if (NULL == typestring)
809 _("Missing option `%s' for operation `%s'\n"),
811 GNUNET_SCHEDULER_shutdown ();
815 type = GNUNET_GNSRECORD_typename_to_number (typestring);
816 if (UINT32_MAX == type)
819 _("Unsupported type `%s'\n"),
821 GNUNET_SCHEDULER_shutdown ();
828 _("Missing option `%s' for operation `%s'\n"),
831 GNUNET_SCHEDULER_shutdown ();
835 GNUNET_GNSRECORD_string_to_value (type,
841 _("Value `%s' invalid for record type `%s'\n"),
844 GNUNET_SCHEDULER_shutdown ();
848 if (NULL == expirationstring)
851 _("Missing option `%s' for operation `%s'\n"),
854 GNUNET_SCHEDULER_shutdown ();
858 if (0 == strcmp (expirationstring,
861 etime_abs = GNUNET_TIME_UNIT_FOREVER_ABS;
862 etime_is_rel = GNUNET_NO;
864 else if (GNUNET_OK ==
865 GNUNET_STRINGS_fancy_time_to_relative (expirationstring,
868 etime_is_rel = GNUNET_YES;
869 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
870 "Storing record with relative expiration time of %s\n",
871 GNUNET_STRINGS_relative_time_to_string (etime_rel,
874 else if (GNUNET_OK ==
875 GNUNET_STRINGS_fancy_time_to_absolute (expirationstring,
878 etime_is_rel = GNUNET_NO;
879 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
880 "Storing record with absolute expiration time of %s\n",
881 GNUNET_STRINGS_absolute_time_to_string (etime_abs));
886 _("Invalid time format `%s'\n"),
888 GNUNET_SCHEDULER_shutdown ();
892 add_qe = GNUNET_NAMESTORE_records_lookup (ns,
897 &get_existing_record,
905 _("Missing option `%s' for operation `%s'\n"),
907 GNUNET_SCHEDULER_shutdown ();
911 del_qe = GNUNET_NAMESTORE_records_lookup (ns,
914 &del_lookup_error_cb,
921 list_it = GNUNET_NAMESTORE_zone_iteration_start (ns,
923 &zone_iteration_error_cb,
927 &zone_iteration_finished,
930 if (NULL != reverse_pkey)
932 struct GNUNET_CRYPTO_EcdsaPublicKey pubkey;
935 GNUNET_CRYPTO_ecdsa_public_key_from_string (reverse_pkey,
936 strlen (reverse_pkey),
940 _("Invalid public key for reverse lookup `%s'\n"),
942 GNUNET_SCHEDULER_shutdown ();
944 reverse_qe = GNUNET_NAMESTORE_zone_to_name (ns,
949 &handle_reverse_lookup,
956 struct GNUNET_CRYPTO_EcdsaPublicKey pkey;
958 GNUNET_STRINGS_utf8_tolower (uri, uri);
959 if ( (2 != (sscanf (uri,
960 "gnunet://gns/%52s/%63s",
964 GNUNET_CRYPTO_ecdsa_public_key_from_string (sh,
969 _("Invalid URI `%s'\n"),
971 GNUNET_SCHEDULER_shutdown ();
975 memset (&rd, 0, sizeof (rd));
977 rd.data_size = sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey);
978 rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY;
979 if (GNUNET_YES == etime_is_rel)
981 rd.expiration_time = etime_rel.rel_value_us;
982 rd.flags |= GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
984 else if (GNUNET_NO == etime_is_rel)
985 rd.expiration_time = etime_abs.abs_value_us;
987 rd.expiration_time = GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us;
990 rd.flags |= GNUNET_GNSRECORD_RF_SHADOW_RECORD;
991 add_qe_uri = GNUNET_NAMESTORE_records_store (ns,
999 if (NULL != nickstring)
1001 if (0 == strlen(nickstring))
1004 _("Invalid nick `%s'\n"),
1006 GNUNET_SCHEDULER_shutdown ();
1010 add_qe_uri = GNUNET_NAMESTORE_set_nick(ns,
1018 zm = GNUNET_NAMESTORE_zone_monitor_start (cfg,
1032 * Callback invoked from identity service with ego information.
1033 * An @a ego of NULL means the ego was not found.
1035 * @param cls closure with the configuration
1036 * @param ego an ego known to identity service, or NULL
1039 identity_cb (void *cls,
1040 const struct GNUNET_IDENTITY_Ego *ego)
1042 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
1047 if (NULL != ego_name)
1050 _("Ego `%s' not known to identity service\n"),
1053 GNUNET_SCHEDULER_shutdown ();
1057 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego);
1058 GNUNET_free_non_null (ego_name);
1060 GNUNET_CLIENT_service_test ("namestore", cfg,
1061 GNUNET_TIME_UNIT_SECONDS,
1068 default_ego_cb (void *cls,
1069 struct GNUNET_IDENTITY_Ego *ego,
1077 _("No default ego configured in identity service\n"));
1078 GNUNET_SCHEDULER_shutdown ();
1084 identity_cb (cls, ego);
1090 id_connect_cb (void *cls,
1091 struct GNUNET_IDENTITY_Ego *ego,
1095 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
1099 get_default = GNUNET_IDENTITY_get (idh,
1108 testservice_id_task (void *cls, int result)
1110 const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
1112 if (result != GNUNET_YES)
1115 _("Identity service is not running\n"));
1116 GNUNET_SCHEDULER_shutdown ();
1120 GNUNET_SCHEDULER_add_shutdown (&do_shutdown,
1123 if (NULL == ego_name)
1125 idh = GNUNET_IDENTITY_connect (cfg,
1129 fprintf (stderr, _("Cannot connect to identity service\n"));
1133 el = GNUNET_IDENTITY_ego_lookup (cfg,
1141 * Main function that will be run.
1143 * @param cls closure
1144 * @param args remaining command-line arguments
1145 * @param cfgfile name of the configuration file used (for saving, can be NULL!)
1146 * @param cfg configuration
1151 const char *cfgfile,
1152 const struct GNUNET_CONFIGURATION_Handle *cfg)
1154 if ( (NULL != args[0]) && (NULL == uri) )
1155 uri = GNUNET_strdup (args[0]);
1157 GNUNET_CLIENT_service_test ("identity", cfg,
1158 GNUNET_TIME_UNIT_SECONDS,
1159 &testservice_id_task,
1165 * The main function for gnunet-namestore.
1167 * @param argc number of arguments from the command line
1168 * @param argv command line arguments
1169 * @return 0 ok, 1 on error
1178 static const struct GNUNET_GETOPT_CommandLineOption options[] = {
1180 gettext_noop ("add record"), 0,
1181 &GNUNET_GETOPT_set_one, &add},
1182 {'d', "delete", NULL,
1183 gettext_noop ("delete record"), 0,
1184 &GNUNET_GETOPT_set_one, &del},
1185 {'D', "display", NULL,
1186 gettext_noop ("display records"), 0,
1187 &GNUNET_GETOPT_set_one, &list},
1188 {'e', "expiration", "TIME",
1189 gettext_noop ("expiration time for record to use (for adding only), \"never\" is possible"), 1,
1190 &GNUNET_GETOPT_set_string, &expirationstring},
1191 {'i', "nick", "NICKNAME",
1192 gettext_noop ("set the desired nick name for the zone"), 1,
1193 &GNUNET_GETOPT_set_string, &nickstring},
1194 {'m', "monitor", NULL,
1195 gettext_noop ("monitor changes in the namestore"), 0,
1196 &GNUNET_GETOPT_set_one, &monitor},
1197 {'n', "name", "NAME",
1198 gettext_noop ("name of the record to add/delete/display"), 1,
1199 &GNUNET_GETOPT_set_string, &name},
1200 {'r', "reverse", "PKEY",
1201 gettext_noop ("determine our name for the given PKEY"), 1,
1202 &GNUNET_GETOPT_set_string, &reverse_pkey},
1203 {'t', "type", "TYPE",
1204 gettext_noop ("type of the record to add/delete/display"), 1,
1205 &GNUNET_GETOPT_set_string, &typestring},
1207 gettext_noop ("URI to import into our zone"), 1,
1208 &GNUNET_GETOPT_set_string, &uri},
1209 {'V', "value", "VALUE",
1210 gettext_noop ("value of the record to add/delete"), 1,
1211 &GNUNET_GETOPT_set_string, &value},
1212 {'p', "public", NULL,
1213 gettext_noop ("create or list public record"), 0,
1214 &GNUNET_GETOPT_set_one, &is_public},
1215 {'s', "shadow", NULL,
1216 gettext_noop ("create shadow record (only valid if all other records of the same type have expired"), 0,
1217 &GNUNET_GETOPT_set_one, &is_shadow},
1218 {'z', "zone", "EGO",
1219 gettext_noop ("name of the ego controlling the zone"), 1,
1220 &GNUNET_GETOPT_set_string, &ego_name},
1221 GNUNET_GETOPT_OPTION_END
1224 if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
1227 GNUNET_log_setup ("gnunet-namestore",
1231 GNUNET_PROGRAM_run (argc,
1234 _("GNUnet zone manipulation tool"),
1238 GNUNET_free ((void*) argv);
1239 GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey);
1242 GNUNET_free ((void*) argv);
1243 GNUNET_CRYPTO_ecdsa_key_clear (&zone_pkey);
1247 /* end of gnunet-namestore.c */