mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
scd: Don't overwrite serialno for Yubikey.
* scd/app-openpgp.c (app_select_openpgp): Keep ->serialno. -- GnuPG-bug-id: 5100 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
41505f0ae5
commit
65c91e601a
@ -6080,9 +6080,16 @@ app_select_openpgp (app_t app)
|
||||
app->appversion |= buffer[7];
|
||||
manufacturer = (buffer[8]<<8 | buffer[9]);
|
||||
|
||||
xfree (app->card->serialno);
|
||||
app->card->serialno = buffer;
|
||||
app->card->serialnolen = buflen;
|
||||
/* For Yubikey, serialno is set in app.c, already. */
|
||||
if (app->card->cardtype == CARDTYPE_YUBIKEY)
|
||||
xfree (buffer);
|
||||
else
|
||||
{
|
||||
xfree (app->card->serialno);
|
||||
app->card->serialno = buffer;
|
||||
app->card->serialnolen = buflen;
|
||||
}
|
||||
|
||||
buffer = NULL;
|
||||
app->app_local = xtrycalloc (1, sizeof *app->app_local);
|
||||
if (!app->app_local)
|
||||
|
Loading…
x
Reference in New Issue
Block a user