diff options
author | Werner Koch <[email protected]> | 2020-11-26 11:36:44 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-11-26 14:56:37 +0000 |
commit | 7113263a00d8c9b09f0dfdb9590bfe2bab1bc776 (patch) | |
tree | c0fca9544130109763875b1175da38feffcb1af0 /scd/app-openpgp.c | |
parent | scd: Do not try to use a non-enabled app after card switching. (diff) | |
download | gnupg-7113263a00d8c9b09f0dfdb9590bfe2bab1bc776.tar.gz gnupg-7113263a00d8c9b09f0dfdb9590bfe2bab1bc776.zip |
agent: Fix YK s/n and prettify the request card prompt for Yubikeys
* agent/divert-scd.c (ask_for_card): Detect and re-format the Yubikey
prompt.
* scd/app.c (app_munge_serialno): Fix Yubikey s/n munging.
(card_get_dispserialno): Ditto.
* scd/app-openpgp.c (get_disp_serialno): Remove.
(get_prompt_info): Use app_get_dispserialno.--
--
Diffstat (limited to 'scd/app-openpgp.c')
-rw-r--r-- | scd/app-openpgp.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 36301ee8d..a30a8e8b5 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -1381,30 +1381,6 @@ get_disp_name (app_t app) } -/* Return the pretty formatted serialnumber. On error NULL is - * returned. */ -static char * -get_disp_serialno (app_t app) -{ - char *serial = app_get_serialno (app); - - /* For our OpenPGP cards we do not want to show the entire serial - * number but a nicely reformatted actual serial number. */ - if (serial && strlen (serial) > 16+12) - { - memmove (serial, serial+16, 4); - serial[4] = ' '; - /* memmove (serial+5, serial+20, 4); */ - /* serial[9] = ' '; */ - /* memmove (serial+10, serial+24, 4); */ - /* serial[14] = 0; */ - memmove (serial+5, serial+20, 8); - serial[13] = 0; - } - return serial; -} - - /* Return the number of remaining tries for the standard or the admin * pw. Returns -1 on card error. */ static int @@ -2324,7 +2300,7 @@ get_prompt_info (app_t app, int chvno, unsigned long sigcount, int remaining) { char *serial, *disp_name, *rembuf, *tmpbuf, *result; - serial = get_disp_serialno (app); + serial = app_get_dispserialno (app, 0); if (!serial) return NULL; |