diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-11-22 21:06:18 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-11-22 21:06:18 +0000 |
commit | f46828a09b86390b0c53cebb5ba88550b3d28f48 (patch) | |
tree | 9143fa2a9dba1478ebfcece311b3a81e55258f03 /src/revocation/gnunet-revocation.c | |
parent | f8a47956eb2d0ffabe2e3cb6b9d5695537eeda85 (diff) | |
download | gnunet-f46828a09b86390b0c53cebb5ba88550b3d28f48.tar.gz gnunet-f46828a09b86390b0c53cebb5ba88550b3d28f48.zip |
additional check for filename
Diffstat (limited to 'src/revocation/gnunet-revocation.c')
-rw-r--r-- | src/revocation/gnunet-revocation.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/revocation/gnunet-revocation.c b/src/revocation/gnunet-revocation.c index ae4f93dc6..59f47ab97 100644 --- a/src/revocation/gnunet-revocation.c +++ b/src/revocation/gnunet-revocation.c | |||
@@ -429,6 +429,13 @@ run (void *cls, | |||
429 | } | 429 | } |
430 | if (NULL != revoke_ego) | 430 | if (NULL != revoke_ego) |
431 | { | 431 | { |
432 | if ( !perform && (NULL == filename) ) | ||
433 | { | ||
434 | FPRINTF (stderr, | ||
435 | "%s", | ||
436 | _("No filename to store revocation certificate given.\n")); | ||
437 | return; | ||
438 | } | ||
432 | /* main code here */ | 439 | /* main code here */ |
433 | el = GNUNET_IDENTITY_ego_lookup (cfg, | 440 | el = GNUNET_IDENTITY_ego_lookup (cfg, |
434 | revoke_ego, | 441 | revoke_ego, |
@@ -492,10 +499,10 @@ main (int argc, char *const *argv) | |||
492 | gettext_noop ("use NAME for the name of the revocation file"), | 499 | gettext_noop ("use NAME for the name of the revocation file"), |
493 | 1, &GNUNET_GETOPT_set_string, &filename}, | 500 | 1, &GNUNET_GETOPT_set_string, &filename}, |
494 | {'R', "revoke", "NAME", | 501 | {'R', "revoke", "NAME", |
495 | gettext_noop ("revoke the private key associated with the ego NAME "), | 502 | gettext_noop ("revoke the private key associated for the the private key associated with the ego NAME "), |
496 | 1, &GNUNET_GETOPT_set_string, &revoke_ego}, | 503 | 1, &GNUNET_GETOPT_set_string, &revoke_ego}, |
497 | {'p', "perform", NULL, | 504 | {'p', "perform", NULL, |
498 | gettext_noop ("actually perform the revocation revocation file, otherwise we just do the precomputation"), | 505 | gettext_noop ("actually perform revocation, otherwise we just do the precomputation"), |
499 | 0, &GNUNET_GETOPT_set_one, &perform}, | 506 | 0, &GNUNET_GETOPT_set_one, &perform}, |
500 | {'t', "test", "KEY", | 507 | {'t', "test", "KEY", |
501 | gettext_noop ("test if the public key KEY has been revoked"), | 508 | gettext_noop ("test if the public key KEY has been revoked"), |