aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-11-15 19:11:40 +0000
committerWerner Koch <[email protected]>2016-11-15 19:11:59 +0000
commit500e594c2da530e69a63fc1a40d173458682fa0e (patch)
tree638b51c32cb94d8b5437c2b556d52f2607db8f81
parentgpg: Add new compliance mode "de-vs". (diff)
downloadgnupg-500e594c2da530e69a63fc1a40d173458682fa0e.tar.gz
gnupg-500e594c2da530e69a63fc1a40d173458682fa0e.zip
gpgv: New option --enable-special-filenames.
* g10/gpgv.c (oEnableSpecialFilenames): New. (opts): Add option --enable-special-filenames. (main): Implement that option. -- This is the same option we have in gpg. It allows to use commands like gpgv --enable-special-filenames -- '-&3' - <msg 3<msg.sig Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r--doc/gpgv.texi6
-rw-r--r--g10/gpgv.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/doc/gpgv.texi b/doc/gpgv.texi
index 9a74c2794..0608a3fbb 100644
--- a/doc/gpgv.texi
+++ b/doc/gpgv.texi
@@ -128,6 +128,12 @@ supplied multiple times if multiple algorithms should be considered
weak. MD5 is always considered weak, and does not need to be listed
explicitly.
+@item --enable-special-filenames
+@opindex enable-special-filenames
+This option enables a mode in which filenames of the form
+@file{-&n}, where n is a non-negative decimal number,
+refer to the file descriptor n and not to a file with that name.
+
@end table
@mansect return value
diff --git a/g10/gpgv.c b/g10/gpgv.c
index d25b6be7d..d9f2898d7 100644
--- a/g10/gpgv.c
+++ b/g10/gpgv.c
@@ -63,6 +63,7 @@ enum cmd_and_opt_values {
oLoggerFD,
oHomedir,
oWeakDigest,
+ oEnableSpecialFilenames,
aTest
};
@@ -83,6 +84,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_s (oHomedir, "homedir", "@"),
ARGPARSE_s_s (oWeakDigest, "weak-digest",
N_("|ALGO|reject signatures made with ALGO")),
+ ARGPARSE_s_n (oEnableSpecialFilenames, "enable-special-filenames", "@"),
ARGPARSE_end ()
};
@@ -201,6 +203,9 @@ main( int argc, char **argv )
additional_weak_digest(pargs.r.ret_str);
break;
case oIgnoreTimeConflict: opt.ignore_time_conflict = 1; break;
+ case oEnableSpecialFilenames:
+ iobuf_enable_special_filenames (1);
+ break;
default : pargs.err = ARGPARSE_PRINT_ERROR; break;
}
}