1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

card: Print the used algorithm of all keys.

* tools/card-call-scd.c (scd_readkey): New.
* tools/card-tool-misc.c (pubkey_algo_string): New.
* tools/gpg-card-tool.c (list_one_kinfo): Print the algo.
--

It is convenient to see the actual algorithm of keys even if no
certificate has yet been created.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2019-02-07 20:28:43 +01:00
parent df6ba6dfd2
commit b79bc877f2
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 108 additions and 0 deletions

View file

@ -620,6 +620,7 @@ list_one_kinfo (key_info_t firstkinfo, key_info_t kinfo, estream_t fp)
userid_t uid;
key_info_t ki;
const char *s;
gcry_sexp_t s_pkey;
if (firstkinfo && kinfo)
{
@ -630,6 +631,14 @@ list_one_kinfo (key_info_t firstkinfo, key_info_t kinfo, estream_t fp)
goto leave;
}
print_keygrip (fp, kinfo->grip);
if (!scd_readkey (kinfo->keyref, &s_pkey))
{
char *tmp = pubkey_algo_string (s_pkey);
tty_fprintf (fp, " algorithm ..: %s\n", tmp);
xfree (tmp);
gcry_sexp_release (s_pkey);
s_pkey = NULL;
}
if (kinfo->fprlen && kinfo->created)
{