diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-02-09 16:00:42 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-02-09 16:00:42 +0900 |
commit | 18a6a2390beac1918a783d9139c111c2813a6862 (patch) | |
tree | 555a32f352b83abfa299e84edfa90bf8095e132b /sm | |
parent | 0b02a3fcea1ca6f54c1148c08e983b0de24af8bf (diff) | |
download | gpg2-18a6a2390beac1918a783d9139c111c2813a6862.tar.gz gpg2-18a6a2390beac1918a783d9139c111c2813a6862.tar.bz2 gpg2-18a6a2390beac1918a783d9139c111c2813a6862.zip |
Imported Upstream version 2.2.13upstream/2.2.13
Diffstat (limited to 'sm')
-rw-r--r-- | sm/certreqgen-ui.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/sm/certreqgen-ui.c b/sm/certreqgen-ui.c index 9772a3b..b131d7d 100644 --- a/sm/certreqgen-ui.c +++ b/sm/certreqgen-ui.c @@ -244,7 +244,27 @@ gpgsm_gencertreq_tty (ctrl_t ctrl, estream_t output_stream) { tty_printf (_("Available keys:\n")); for (count=1,sl=keypairlist; sl; sl = sl->next, count++) - tty_printf (" (%d) %s\n", count, sl->d); + { + ksba_sexp_t pkey; + gcry_sexp_t s_pkey; + char *algostr = NULL; + const char *keyref; + + keyref = strchr (sl->d, ' '); + if (keyref) + { + keyref++; + if (!gpgsm_agent_readkey (ctrl, 1, keyref, &pkey)) + { + if (!gcry_sexp_new (&s_pkey, pkey, 0, 0)) + algostr = pubkey_algo_string (s_pkey); + gcry_sexp_release (s_pkey); + } + xfree (pkey); + } + tty_printf (" (%d) %s %s\n", count, sl->d, algostr); + xfree (algostr); + } xfree (answer); answer = tty_get (_("Your selection? ")); tty_kill_prompt (); |