GNUPG-1-9-BRANCH gnupg/tools (ChangeLog symcryptrun.c)
cvs user wk
cvs at cvs.gnupg.org
Thu Apr 21 11:50:47 CEST 2005
Date: Thursday, April 21, 2005 @ 12:07:41
Author: wk
Path: /cvs/gnupg/gnupg/tools
Tag: GNUPG-1-9-BRANCH
Modified: ChangeLog symcryptrun.c
(main): Optionally allow the input file as command
line argument.
---------------+
ChangeLog | 3 +++
symcryptrun.c | 16 +++++++++++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
Index: gnupg/tools/ChangeLog
diff -u gnupg/tools/ChangeLog:1.25.2.73 gnupg/tools/ChangeLog:1.25.2.74
--- gnupg/tools/ChangeLog:1.25.2.73 Thu Apr 21 11:33:06 2005
+++ gnupg/tools/ChangeLog Thu Apr 21 12:07:41 2005
@@ -1,5 +1,8 @@
2005-04-21 Werner Koch <wk at g10code.com>
+ * symcryptrun.c (main): Optionally allow the input file as command
+ line argument.
+
* gpgconf-comp.c: Add gpgsm option disable-trusted-cert-crl-check.
2005-04-20 Werner Koch <wk at g10code.com>
Index: gnupg/tools/symcryptrun.c
diff -u gnupg/tools/symcryptrun.c:1.1.2.7 gnupg/tools/symcryptrun.c:1.1.2.8
--- gnupg/tools/symcryptrun.c:1.1.2.7 Thu Apr 21 11:33:06 2005
+++ gnupg/tools/symcryptrun.c Thu Apr 21 12:07:41 2005
@@ -190,7 +190,7 @@
break;
case 41:
p = _("Syntax: symcryptrun --class CLASS --program PROGRAM "
- "--keyfile KEYFILE [options...] COMMAND\n"
+ "--keyfile KEYFILE [options...] COMMAND [inputfile]\n"
"Call a simple symmetric encryption tool\n");
break;
case 31: p = "\nHome: "; break;
@@ -961,6 +961,20 @@
xfree (configname);
configname = NULL;
+ /* With --inputfile an argument is not allowed, without only one
+ optional argument is allowed. */
+ if (argc > 1)
+ log_error (_("too many arguments\n"));
+ else if (opt.input && argc)
+ log_error (_("no argument allowed when using option \"%s\"\n"),
+ "--inputfile");
+
+ if (argc)
+ {
+ opt.input = *argv;
+ argv++; argc--;
+ }
+
if (!mode)
log_error (_("either %s or %s must be given\n"),
"--decrypt", "--encrypt");
More information about the Gnupg-commits
mailing list