1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

g10: Always save standard revocation certificate in file.

* g10/main.h (open_outfile): New parameter NO_OUTFILE.
* g10/openfile.c (open_outfile): New parameter NO_OUTFILE.  If given,
never use opt.outfile.
* g10/revoke.c (create_revocation): If FILENAME is true, also set
NO_OUTFILE to true (for standard revocation certificates).
* g10/dearmor.c, g10/encrypt.c, g10/export.c, g10/revoke.c,
g10/sign.c: Adjust all other callers.

Signed-off-by: Marcus Brinkmann <mb@g10code.com>
GnuPG-bug-id: 3015
This commit is contained in:
Marcus Brinkmann 2017-08-01 17:41:03 +02:00
parent a8d0b8d233
commit ebc65ff459
7 changed files with 18 additions and 16 deletions

View file

@ -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 )) )
if( (rc = open_outfile (-1, NULL, 0, 1, &out, 0 )) )
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)))
if ((rc = open_outfile (-1, filename, suffix, 1, &out, !!filename)))
goto leave;
if (leadintext )