From 0cf79eed6816fc91fd15ebf69543cc8fbc3ad8bb Mon Sep 17 00:00:00 2001 From: David Shaw Date: Tue, 9 Sep 2003 00:20:21 +0000 Subject: [PATCH] * g10.c (main): Error out if --multifile is used with the commands that don't support it yet (--sign, --clearsign, --detach-sign, --symmetric, and --store). --- g10/ChangeLog | 6 ++++++ g10/g10.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/g10/ChangeLog b/g10/ChangeLog index ba6261518..769c12064 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,9 @@ +2003-09-08 David Shaw + + * g10.c (main): Error out if --multifile is used with the commands + that don't support it yet (--sign, --clearsign, --detach-sign, + --symmetric, and --store). + 2003-09-05 David Shaw * g10.c (main): Add --multifile as an alias to turn --encrypt into diff --git a/g10/g10.c b/g10/g10.c index b9369ec80..4753db9e2 100644 --- a/g10/g10.c +++ b/g10/g10.c @@ -1932,6 +1932,37 @@ main( int argc, char **argv ) keygen_set_std_prefs(pers_compress_list,PREFTYPE_ZIP)) log_error(_("invalid personal compress preferences\n")); + /* We don't support all possible commands with multifile yet */ + if(multifile) + { + char *cmdname; + + switch(cmd) + { + case aSign: + cmdname="--sign"; + break; + case aClearsign: + cmdname="--clearsign"; + break; + case aDetachedSign: + cmdname="--detach-sign"; + break; + case aSym: + cmdname="--symmetric"; + break; + case aStore: + cmdname="--store"; + break; + default: + cmdname=NULL; + break; + } + + if(cmdname) + log_error(_("%s does not yet work with %s\n"),cmdname,"--multifile"); + } + if( log_get_errorcount(0) ) g10_exit(2);