[Pkg-gnupg-commit] [gnupg2] 10/34: Revert "g10: Always save standard revocation certificate in file."
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Fri Aug 11 16:51:22 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch upstream
in repository gnupg2.
commit 624cd2d0bf6cc6dd1b79654295dc76f5b2d6d70b
Author: Marcus Brinkmann <marcus.brinkmann at ruhr-uni-bochum.de>
Date: Tue Aug 1 19:08:16 2017 +0200
Revert "g10: Always save standard revocation certificate in file."
This reverts commit ebc65ff459e6c228fb7406e375819a9fe5637abe.
---
g10/dearmor.c | 4 ++--
g10/encrypt.c | 4 ++--
g10/export.c | 2 +-
g10/main.h | 2 +-
g10/openfile.c | 12 +++++-------
g10/revoke.c | 4 ++--
g10/sign.c | 6 +++---
7 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/g10/dearmor.c b/g10/dearmor.c
index 839227a..92239cc 100644
--- a/g10/dearmor.c
+++ b/g10/dearmor.c
@@ -63,7 +63,7 @@ dearmor_file( const char *fname )
push_armor_filter ( afx, inp );
- if( (rc = open_outfile (-1, fname, 0, 0, &out, 0)) )
+ if( (rc = open_outfile (-1, fname, 0, 0, &out)) )
goto leave;
while( (c = iobuf_get(inp)) != -1 )
@@ -109,7 +109,7 @@ enarmor_file( const char *fname )
}
- if( (rc = open_outfile (-1, fname, 1, 0, &out, 0 )) )
+ if( (rc = open_outfile (-1, fname, 1, 0, &out )) )
goto leave;
afx->what = 4;
diff --git a/g10/encrypt.c b/g10/encrypt.c
index 6495280..c68d6d5 100644
--- a/g10/encrypt.c
+++ b/g10/encrypt.c
@@ -276,7 +276,7 @@ encrypt_simple (const char *filename, int mode, int use_seskey)
do_compress = 0;
}
- if ( rc || (rc = open_outfile (-1, filename, opt.armor? 1:0, 0, &out, 0 )))
+ if ( rc || (rc = open_outfile (-1, filename, opt.armor? 1:0, 0, &out )))
{
iobuf_cancel (inp);
xfree (cfx.dek);
@@ -574,7 +574,7 @@ encrypt_crypt (ctrl_t ctrl, int filefd, const char *filename,
if (opt.textmode)
iobuf_push_filter (inp, text_filter, &tfx);
- rc = open_outfile (outputfd, filename, opt.armor? 1:0, 0, &out, 0);
+ rc = open_outfile (outputfd, filename, opt.armor? 1:0, 0, &out);
if (rc)
goto leave;
diff --git a/g10/export.c b/g10/export.c
index b194a2a..8f6371b 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -352,7 +352,7 @@ do_export (ctrl_t ctrl, strlist_t users, int secret, unsigned int options,
memset( &zfx, 0, sizeof zfx);
- rc = open_outfile (-1, NULL, 0, !!secret, &out, 0 );
+ rc = open_outfile (-1, NULL, 0, !!secret, &out );
if (rc)
return rc;
diff --git a/g10/main.h b/g10/main.h
index 5862cdf..87417ee 100644
--- a/g10/main.h
+++ b/g10/main.h
@@ -324,7 +324,7 @@ int overwrite_filep( const char *fname );
char *make_outfile_name( const char *iname );
char *ask_outfile_name( const char *name, size_t namelen );
int open_outfile (int inp_fd, const char *iname, int mode,
- int restrictedperm, iobuf_t *a, int no_outfile);
+ int restrictedperm, iobuf_t *a);
char *get_matching_datafile (const char *sigfilename);
iobuf_t open_sigfile (const char *sigfilename, progress_filter_context_t *pfx);
void try_make_homedir( const char *fname );
diff --git a/g10/openfile.c b/g10/openfile.c
index 03b114d..78f4dbb 100644
--- a/g10/openfile.c
+++ b/g10/openfile.c
@@ -174,15 +174,13 @@ ask_outfile_name( const char *name, size_t namelen )
* If INP_FD is not -1 the function simply creates an IOBUF for that
* file descriptor and ignore INAME and MODE. Note that INP_FD won't
* be closed if the returned IOBUF is closed. With RESTRICTEDPERM a
- * file will be created with mode 700 if possible. If NO_OUTFILE is
- * true, don't use the outfile option even if it is set.
+ * file will be created with mode 700 if possible.
*/
int
open_outfile (int inp_fd, const char *iname, int mode, int restrictedperm,
- iobuf_t *a, int no_outfile)
+ iobuf_t *a)
{
int rc = 0;
- const char outfile = no_outfile ? NULL : opt.outfile;
*a = NULL;
if (inp_fd != -1)
@@ -202,7 +200,7 @@ open_outfile (int inp_fd, const char *iname, int mode, int restrictedperm,
log_info (_("writing to '%s'\n"), xname);
}
}
- else if (iobuf_is_pipe_filename (iname) && !outfile)
+ else if (iobuf_is_pipe_filename (iname) && !opt.outfile)
{
*a = iobuf_create (NULL, 0);
if ( !*a )
@@ -220,8 +218,8 @@ open_outfile (int inp_fd, const char *iname, int mode, int restrictedperm,
if (opt.dry_run)
name = NAME_OF_DEV_NULL;
- else if (outfile)
- name = outfile;
+ else if (opt.outfile)
+ name = opt.outfile;
else
{
#ifdef USE_ONLY_8DOT3
diff --git a/g10/revoke.c b/g10/revoke.c
index db3c495..1dea6ae 100644
--- a/g10/revoke.c
+++ b/g10/revoke.c
@@ -334,7 +334,7 @@ gen_desig_revoke (ctrl_t ctrl, const char *uname, strlist_t locusr)
if( !opt.armor )
tty_printf(_("ASCII armored output forced.\n"));
- if( (rc = open_outfile (-1, NULL, 0, 1, &out, 0 )) )
+ if( (rc = open_outfile (-1, NULL, 0, 1, &out )) )
goto leave;
afx->what = 1;
@@ -461,7 +461,7 @@ create_revocation (ctrl_t ctrl,
afx = new_armor_context ();
- if ((rc = open_outfile (-1, filename, suffix, 1, &out, !!filename)))
+ if ((rc = open_outfile (-1, filename, suffix, 1, &out)))
goto leave;
if (leadintext )
diff --git a/g10/sign.c b/g10/sign.c
index 0e379bc..4cf0cd3 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -889,7 +889,7 @@ sign_file (ctrl_t ctrl, strlist_t filenames, int detached, strlist_t locusr,
log_info(_("writing to '%s'\n"), outfile );
}
else if( (rc = open_outfile (-1, fname,
- opt.armor? 1: detached? 2:0, 0, &out, 0)))
+ opt.armor? 1: detached? 2:0, 0, &out)))
goto leave;
/* prepare to calculate the MD over the input */
@@ -1191,7 +1191,7 @@ clearsign_file (ctrl_t ctrl,
else if( opt.verbose )
log_info(_("writing to '%s'\n"), outfile );
}
- else if ((rc = open_outfile (-1, fname, 1, 0, &out, 0)))
+ else if ((rc = open_outfile (-1, fname, 1, 0, &out)))
goto leave;
iobuf_writestr(out, "-----BEGIN PGP SIGNED MESSAGE-----" LF );
@@ -1340,7 +1340,7 @@ sign_symencrypt_file (ctrl_t ctrl, const char *fname, strlist_t locusr)
cfx.dek->use_mdc = use_mdc (NULL, cfx.dek->algo);
/* now create the outfile */
- rc = open_outfile (-1, fname, opt.armor? 1:0, 0, &out, 0);
+ rc = open_outfile (-1, fname, opt.armor? 1:0, 0, &out);
if (rc)
goto leave;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list