summaryrefslogtreecommitdiffstats
path: root/g10/keygen.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>2017-07-26 18:06:29 +0200
committerMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>2017-07-26 18:10:21 +0200
commit94eea0ed2c8b47cb0fe02b22cbe668705a5fe0d0 (patch)
tree842adb958f9759b3fec7393ea3871214e198df63 /g10/keygen.c
parentdoc: Add man pages form gpg-wks-server and gpg-wks-client. (diff)
downloadgnupg2-94eea0ed2c8b47cb0fe02b22cbe668705a5fe0d0.tar.xz
gnupg2-94eea0ed2c8b47cb0fe02b22cbe668705a5fe0d0.zip
g10: Make sure exactly one fingerprint is output with --quick-gen-key.
* g10/keygen.c (do_generate_keypair): Only set fpr in list_keyblock_direct invocation if neither --fingerprint nor --with-fingerprints are given. Signed-off-by: Marcus Brinkmann <mb@g10code.com> GnuPG-bug-id: 2741
Diffstat (limited to 'g10/keygen.c')
-rw-r--r--g10/keygen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index bfbed0ebd..542c1a5ff 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -4808,7 +4808,8 @@ do_generate_keypair (ctrl_t ctrl, struct para_data_s *para,
tty_printf (_("public and secret key created and signed.\n") );
tty_printf ("\n");
merge_keys_and_selfsig (ctrl, pub_root);
- list_keyblock_direct (ctrl, pub_root, 0, 1, 1, 1);
+
+ list_keyblock_direct (ctrl, pub_root, 0, 1, opt.fingerprint || opt.with_fingerprint, 1);
}