mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
Revert "g10: Always save standard revocation certificate in file."
This reverts commit ebc65ff459e6c228fb7406e375819a9fe5637abe.
This commit is contained in:
parent
ebc65ff459
commit
624cd2d0bf
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 );
|
||||
|
@ -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
|
||||
|
@ -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 )
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user