[Pkg-gnupg-commit] [gnupg2] 29/49: gpg: Rename two card related functions in card-util.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Nov 8 19:30:54 UTC 2017
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit de3a740c2e1156e58d2f94faa85c051740c8988e
Author: Werner Koch <wk at gnupg.org>
Date: Fri Oct 27 14:44:53 2017 +0200
gpg: Rename two card related functions in card-util.
* g10/card-util.c (ask_card_rsa_keysize): Rename to ask_card_keyattr.
(do_change_rsa_keysize): Rename to do_change_keyattr.
--
We want to support other algos than RSA and thus we need a better name
for the functions.
Signed-off-by: Werner Koch <wk at gnupg.org>
(cherry picked from commit f795f4529d8ab5a05db1cc1960abd34390bfae1b)
---
g10/card-util.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/g10/card-util.c b/g10/card-util.c
index 62b2a67..022e9a6 100644
--- a/g10/card-util.c
+++ b/g10/card-util.c
@@ -1328,7 +1328,7 @@ show_keysize_warning (void)
select the prompt. Returns 0 to use the default size (i.e. NBITS)
or the selected size. */
static unsigned int
-ask_card_rsa_keysize (int keyno, unsigned int nbits)
+ask_card_keyattr (int keyno, unsigned int nbits)
{
unsigned int min_nbits = 1024;
unsigned int max_nbits = 4096;
@@ -1378,7 +1378,7 @@ ask_card_rsa_keysize (int keyno, unsigned int nbits)
/* Change the size of key KEYNO (0..2) to NBITS and show an error
message if that fails. */
static gpg_error_t
-do_change_rsa_keysize (int keyno, unsigned int nbits)
+do_change_keyattr (int keyno, unsigned int nbits)
{
gpg_error_t err;
char args[100];
@@ -1459,8 +1459,8 @@ generate_card_keys (ctrl_t ctrl)
{
if (info.key_attr[keyno].algo == PUBKEY_ALGO_RSA)
{
- nbits = ask_card_rsa_keysize (keyno, info.key_attr[keyno].nbits);
- if (nbits && do_change_rsa_keysize (keyno, nbits))
+ nbits = ask_card_keyattr (keyno, info.key_attr[keyno].nbits);
+ if (nbits && do_change_keyattr (keyno, nbits))
{
/* Error: Better read the default key size again. */
agent_release_card_info (&info);
@@ -1542,8 +1542,8 @@ card_generate_subkey (ctrl_t ctrl, kbnode_t pub_keyblock)
unsigned int nbits;
ask_again:
- nbits = ask_card_rsa_keysize (keyno-1, info.key_attr[keyno-1].nbits);
- if (nbits && do_change_rsa_keysize (keyno-1, nbits))
+ nbits = ask_card_keyattr (keyno-1, info.key_attr[keyno-1].nbits);
+ if (nbits && do_change_keyattr (keyno-1, nbits))
{
/* Error: Better read the default key size again. */
agent_release_card_info (&info);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list