mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
scd: Print the main app name also for not fully supported cards.
* scd/app.c (send_serialno_and_app_status): Add fallback. -- The app list was only printed for apps which support the with_keygrip function. That is not the case for the netkey and otehr cards. The new fallback prints the actual app name. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
e582d8f5b2
commit
11d917c779
@ -2037,6 +2037,7 @@ send_serialno_and_app_status (card_t card, int with_apps, ctrl_t ctrl)
|
|||||||
char buf[65];
|
char buf[65];
|
||||||
char *p;
|
char *p;
|
||||||
membuf_t mb;
|
membuf_t mb;
|
||||||
|
int any = 0;
|
||||||
|
|
||||||
if (DIM (buf) < 2 * card->serialnolen + 1)
|
if (DIM (buf) < 2 * card->serialnolen + 1)
|
||||||
return 0; /* Oops. */
|
return 0; /* Oops. */
|
||||||
@ -2057,9 +2058,17 @@ send_serialno_and_app_status (card_t card, int with_apps, ctrl_t ctrl)
|
|||||||
{
|
{
|
||||||
if (!a->fnc.with_keygrip)
|
if (!a->fnc.with_keygrip)
|
||||||
continue;
|
continue;
|
||||||
|
any = 1;
|
||||||
put_membuf (&mb, " ", 1);
|
put_membuf (&mb, " ", 1);
|
||||||
put_membuf_str (&mb, xstrapptype (a));
|
put_membuf_str (&mb, xstrapptype (a));
|
||||||
}
|
}
|
||||||
|
if (!any && card->app)
|
||||||
|
{
|
||||||
|
/* No card app supports the with_keygrip function. Use the
|
||||||
|
* main app as fallback. */
|
||||||
|
put_membuf (&mb, " ", 1);
|
||||||
|
put_membuf_str (&mb, xstrapptype (card->app));
|
||||||
|
}
|
||||||
put_membuf (&mb, "", 1);
|
put_membuf (&mb, "", 1);
|
||||||
p = get_membuf (&mb, NULL);
|
p = get_membuf (&mb, NULL);
|
||||||
if (!p)
|
if (!p)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user