diff options
author | Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> | 2017-08-02 15:19:04 +0200 |
---|---|---|
committer | Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> | 2017-08-02 16:14:48 +0200 |
commit | dcfb01959802b27869528dda1d9a4f5e79574bb5 (patch) | |
tree | d33bb27df3f0f3329b9bdb0ba1d49aad8c5ad07c /g10/revoke.c | |
parent | Revert "g10: Always save standard revocation certificate in file." (diff) | |
download | gnupg2-dcfb01959802b27869528dda1d9a4f5e79574bb5.tar.xz gnupg2-dcfb01959802b27869528dda1d9a4f5e79574bb5.zip |
g10: Always save standard revocation certificate in file.
* g10/revoke.c (gen_standard_revocation): Set opt.outfile to NULL
temporarily to create certificate in right place.
Signed-off-by: Marcus Brinkmann <mb@g10code.com>
GnuPG-bug-id: 3015
Diffstat (limited to 'g10/revoke.c')
-rw-r--r-- | g10/revoke.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/g10/revoke.c b/g10/revoke.c index 1dea6ae12..457870082 100644 --- a/g10/revoke.c +++ b/g10/revoke.c @@ -532,6 +532,7 @@ gen_standard_revoke (ctrl_t ctrl, PKT_public_key *psk, const char *cache_nonce) u32 keyid[2]; int kl; char *orig_codeset; + char *old_outfile; dir = get_openpgp_revocdir (gnupg_homedir ()); tmpstr = hexfingerprint (psk, NULL, 0); @@ -586,8 +587,11 @@ gen_standard_revoke (ctrl_t ctrl, PKT_public_key *psk, const char *cache_nonce) reason.code = 0x00; /* No particular reason. */ reason.desc = NULL; + old_outfile = opt.outfile; + opt.outfile = NULL; rc = create_revocation (ctrl, fname, &reason, psk, NULL, leadin, 3, cache_nonce); + opt.outfile = old_outfile; if (!rc && !opt.quiet) log_info (_("revocation certificate stored as '%s.rev'\n"), fname); |