summaryrefslogtreecommitdiffstats
path: root/g10/keylist.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2016-06-14 23:15:32 +0200
committerWerner Koch <wk@gnupg.org>2016-06-14 23:15:32 +0200
commitb56aebe76657ce6efa9c6819d5a8c2a31c2bbbba (patch)
treecd9106fd74ea4bd4eaf6f475cab51460f8acd8ad /g10/keylist.c
parentldap: Improve info output for v3 fallback (diff)
downloadgnupg2-b56aebe76657ce6efa9c6819d5a8c2a31c2bbbba.tar.xz
gnupg2-b56aebe76657ce6efa9c6819d5a8c2a31c2bbbba.zip
gpg: Print the subkey's curve and not the primary key curve.
* g10/keylist.c (list_keyblock_colon): Use PK2 for the subkey's curve. -- Reported-by: mantorix at vollbio punkt de Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/keylist.c')
-rw-r--r--g10/keylist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/g10/keylist.c b/g10/keylist.c
index d77c86b8b..0ac763d65 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -1542,11 +1542,11 @@ list_keyblock_colon (ctrl_t ctrl, kbnode_t keyblock,
}
es_putc (':', es_stdout); /* End of field 15. */
es_putc (':', es_stdout); /* End of field 16. */
- if (pk->pubkey_algo == PUBKEY_ALGO_ECDSA
- || pk->pubkey_algo == PUBKEY_ALGO_EDDSA
- || pk->pubkey_algo == PUBKEY_ALGO_ECDH)
+ if (pk2->pubkey_algo == PUBKEY_ALGO_ECDSA
+ || pk2->pubkey_algo == PUBKEY_ALGO_EDDSA
+ || pk2->pubkey_algo == PUBKEY_ALGO_ECDH)
{
- char *curve = openpgp_oid_to_str (pk->pkey[0]);
+ char *curve = openpgp_oid_to_str (pk2->pkey[0]);
const char *name = openpgp_oid_to_curve (curve, 0);
if (!name)
name = curve;