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:
parent
df6ba6dfd2
commit
b79bc877f2
4 changed files with 108 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue