Home GnuPG
Diffusion GnuPG ebc65ff459e6

g10: Always save standard revocation certificate in file.
Needs Verificationebc65ff459e6

Description

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: T3015

Event Timeline

werner added a subscriber: werner.

I don't like this patch because it is too large for what it achieves. The common way how we override global options is to save the old option, set that option, process, and the restore the option. In the revoke code we already do this for opt.armor.

Also you should not mix input and output parameters. In open_outfile the result was the last parameter, which is now followed by an input flag.

BTW, when adding new args to functions it is always good to take the extra work and pass ctrl_t as first arg. This will help eventually us to allow for multiple connections to gpg (server mode, like we do in gpgsm).

This commit now has outstanding concerns.Aug 1 2017, 6:37 PM
marcus requested verification of this commit.Aug 7 2017, 8:08 PM

Was reverted.

This commit now requires verification by auditors.Aug 7 2017, 8:08 PM