mirror of
git://git.gnupg.org/gnupg.git
synced 2025-05-14 08:13:25 +02:00
(main): Optionally allow the input file as command
line argument.
This commit is contained in:
parent
3ff9a743bf
commit
07aa7b210a
@ -1,5 +1,8 @@
|
|||||||
2005-04-21 Werner Koch <wk@g10code.com>
|
2005-04-21 Werner Koch <wk@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.
|
* gpgconf-comp.c: Add gpgsm option disable-trusted-cert-crl-check.
|
||||||
|
|
||||||
2005-04-20 Werner Koch <wk@g10code.com>
|
2005-04-20 Werner Koch <wk@g10code.com>
|
||||||
|
@ -190,7 +190,7 @@ my_strusage (int level)
|
|||||||
break;
|
break;
|
||||||
case 41:
|
case 41:
|
||||||
p = _("Syntax: symcryptrun --class CLASS --program PROGRAM "
|
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");
|
"Call a simple symmetric encryption tool\n");
|
||||||
break;
|
break;
|
||||||
case 31: p = "\nHome: "; break;
|
case 31: p = "\nHome: "; break;
|
||||||
@ -961,6 +961,20 @@ main (int argc, char **argv)
|
|||||||
xfree (configname);
|
xfree (configname);
|
||||||
configname = NULL;
|
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)
|
if (!mode)
|
||||||
log_error (_("either %s or %s must be given\n"),
|
log_error (_("either %s or %s must be given\n"),
|
||||||
"--decrypt", "--encrypt");
|
"--decrypt", "--encrypt");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user