[git] GnuPG - branch, master, updated. gnupg-2.1.15-93-ga8363b7

by Werner Koch cvs at cvs.gnupg.org
Thu Sep 8 11:00:31 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  a8363b7d0bcc77b55226d5fe8f972214c968ddc3 (commit)
      from  bbe940c095f2bca7a1ca5f8e68ca1af98350a885 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a8363b7d0bcc77b55226d5fe8f972214c968ddc3
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Sep 8 10:50:51 2016 +0200

    gpg: Add options --output and --yes to gpgv.
    
    * g10/gpgv.c (oOutput, oAnswerYes): New.
    (opts): Add --output and --yes.
    (main): Implement options.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/doc/gpg.texi b/doc/gpg.texi
index 74977c5..5889c2f 100644
--- a/doc/gpg.texi
+++ b/doc/gpg.texi
@@ -2153,7 +2153,8 @@ Assume the input data is not in ASCII armored format.
 @item --output @var{file}
 @itemx -o @var{file}
 @opindex output
-Write output to @var{file}.
+Write output to @var{file}.  To write to stdout use @code{-} as the
+filename.
 
 @item --max-output @code{n}
 @opindex max-output
diff --git a/doc/gpgv.texi b/doc/gpgv.texi
index 1d9a81e..6676bde 100644
--- a/doc/gpgv.texi
+++ b/doc/gpgv.texi
@@ -92,6 +92,16 @@ are replaced by the HOME directory. If the filename
 does not contain a slash, it is assumed to be in the
 home-directory ("~/.gnupg" if --homedir is not used).
 
+ at item --output @var{file}
+ at itemx -o @var{file}
+ at opindex output
+Write output to @var{file}.  This option can be used to get the signed
+text from a cleartext or binary signature; it also works for detached
+signatures, but in that case this option is in general not
+useful. Unless you write to stdout (using @code{-} for @var{file}) you
+should also use the option @option{--yes} to force overwriting an
+existing file.
+
 @item --status-fd @var{n}
 @opindex status-fd
 Write special status strings to the file descriptor @var{n}.  See the
diff --git a/g10/gpgv.c b/g10/gpgv.c
index 1f2cecb..aa1fcea 100644
--- a/g10/gpgv.c
+++ b/g10/gpgv.c
@@ -55,6 +55,7 @@ enum cmd_and_opt_values {
   aNull = 0,
   oQuiet	  = 'q',
   oVerbose	  = 'v',
+  oOutput	  = 'o',
   oBatch	  = 500,
   oKeyring,
   oIgnoreTimeConflict,
@@ -62,6 +63,8 @@ enum cmd_and_opt_values {
   oLoggerFD,
   oHomedir,
   oWeakDigest,
+  oAnswerYes,
+  oAnswerNo,
   aTest
 };
 
@@ -73,6 +76,7 @@ static ARGPARSE_OPTS opts[] = {
   ARGPARSE_s_n (oQuiet,   "quiet",   N_("be somewhat more quiet")),
   ARGPARSE_s_s (oKeyring, "keyring",
                 N_("|FILE|take the keys from the keyring FILE")),
+  ARGPARSE_s_s (oOutput, "output", N_("|FILE|write output to FILE")),
   ARGPARSE_s_n (oIgnoreTimeConflict, "ignore-time-conflict",
                 N_("make timestamp conflicts only a warning")),
   ARGPARSE_s_i (oStatusFD, "status-fd",
@@ -81,6 +85,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 (oAnswerYes, "yes", "@"),
 
   ARGPARSE_end ()
 };
@@ -188,6 +193,8 @@ main( int argc, char **argv )
           gcry_control (GCRYCTL_SET_VERBOSITY, (int)opt.verbose);
           break;
         case oKeyring: append_to_strlist( &nrings, pargs.r.ret_str); break;
+        case oOutput: opt.outfile = pargs.r.ret_str; break;
+        case oAnswerYes: opt.answer_yes = 1; break;
         case oStatusFD: set_status_fd( pargs.r.ret_int ); break;
         case oLoggerFD:
           log_set_fd (translate_sys2libc_fd_int (pargs.r.ret_int, 1));

-----------------------------------------------------------------------

Summary of changes:
 doc/gpg.texi  |  3 ++-
 doc/gpgv.texi | 10 ++++++++++
 g10/gpgv.c    |  7 +++++++
 3 files changed, 19 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list