aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-03-15 21:24:01 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-03-15 21:24:01 +0000
commit2a7fad623328bba9226cfd3f4f00d779c495c414 (patch)
tree909ffc1a9ad61e0b8668da9db8afef7d4af84c96
parent91d3dd677ac489a58957af865f0f93cc05c4dc00 (diff)
downloadgnunet-2a7fad623328bba9226cfd3f4f00d779c495c414.tar.gz
gnunet-2a7fad623328bba9226cfd3f4f00d779c495c414.zip
-rw-r--r--src/namestore/gnunet-namestore.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index c58d58fd1..bd083470e 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -260,10 +260,17 @@ run (void *cls, char *const *args, const char *cfgfile,
260 260
261 if (NULL == keyfile) 261 if (NULL == keyfile)
262 { 262 {
263 fprintf (stderr, 263 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_filename (cfg, "gns",
264 _("Option `%s' not given, but I need a zone key file!\n"), 264 "ZONEKEY", &keyfile))
265 "z"); 265 {
266 return; 266 fprintf (stderr,
267 _("Option `%s' not given, but I need a zone key file!\n"),
268 "z");
269 return;
270 }
271 fprintf (stderr,
272 _("Using default zone file `%s'\n"),
273 keyfile);
267 } 274 }
268 zone_pkey = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile); 275 zone_pkey = GNUNET_CRYPTO_rsa_key_create_from_file (keyfile);
269 GNUNET_free (keyfile); 276 GNUNET_free (keyfile);
@@ -271,6 +278,8 @@ run (void *cls, char *const *args, const char *cfgfile,
271 if (! (add|del|list)) 278 if (! (add|del|list))
272 { 279 {
273 /* nothing more to be done */ 280 /* nothing more to be done */
281 fprintf (stderr,
282 _("No options given\n"));
274 GNUNET_CRYPTO_rsa_key_free (zone_pkey); 283 GNUNET_CRYPTO_rsa_key_free (zone_pkey);
275 zone_pkey = NULL; 284 zone_pkey = NULL;
276 return; 285 return;