diff options
author | NIIBE Yutaka <[email protected]> | 2018-04-05 01:37:23 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2018-04-05 01:37:23 +0000 |
commit | 870527df0dd704c994928348c8c2910030776680 (patch) | |
tree | 592fc4195894e38866b68dd8af8fd4941f2331b4 | |
parent | tests: Fix no gpg-agent upon removal of GNUPGHOME. (diff) | |
download | gnupg-870527df0dd704c994928348c8c2910030776680.tar.gz gnupg-870527df0dd704c994928348c8c2910030776680.zip |
g10: Let card-edit/key-attr show message when change.
* g10/card-util.c (ask_card_rsa_keysize): Don't show message here.
(ask_card_keyattr): Show message when change, also for ECC.
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | g10/card-util.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/g10/card-util.c b/g10/card-util.c index e33a41706..896ead06b 100644 --- a/g10/card-util.c +++ b/g10/card-util.c @@ -1389,12 +1389,7 @@ ask_card_rsa_keysize (unsigned int nbits) "RSA", min_nbits, max_nbits); } else - { - tty_printf (_("The card will now be re-configured" - " to generate a key of %u bits\n"), req_nbits); - show_keysize_warning (); - return req_nbits; - } + return req_nbits; } } @@ -1501,8 +1496,19 @@ ask_card_keyattr (int keyno, const struct key_attr *current) } leave: - if (!key_attr) - tty_printf (_("No change.")); + if (key_attr) + { + if (key_attr->algo == PUBKEY_ALGO_RSA) + tty_printf (_("The card will now be re-configured" + " to generate a key of %u bits\n"), key_attr->nbits); + else if (key_attr->algo == PUBKEY_ALGO_ECDH + || key_attr->algo == PUBKEY_ALGO_ECDSA + || key_attr->algo == PUBKEY_ALGO_EDDSA) + tty_printf (_("The card will now be re-configured" + " to generate a key of type: %s\n"), key_attr->curve), + + show_keysize_warning (); + } return key_attr; } |