g10: Make sure exactly one fingerprint is output with --quick-gen-key.
authorMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Wed, 26 Jul 2017 16:06:29 +0000 (18:06 +0200)
committerMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Wed, 26 Jul 2017 16:10:21 +0000 (18:10 +0200)
* 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

g10/keygen.c

index bfbed0e..542c1a5 100644 (file)
@@ -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);
             }