1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

scd: Fix reading of the ATR for card type detection.

* scd/app.c (app_new_register): Do not use apdu_get_slot.
--

apdu_get_slot() may only be used after the APP has been initialized.
Thus we need to pass teh slot here directly.

Fixes-commit: 9f148360a2bf04672b43ef7cec48e21d44b06ae1
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2020-08-27 11:53:06 +02:00
parent 05358d7384
commit 95b5a852e2
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -548,7 +548,7 @@ app_new_register (int slot, ctrl_t ctrl, const char *name,
size_t atrlen;
/* This is heuristics to identify different implementations. */
atr = apdu_get_atr (app_get_slot (app), &atrlen);
atr = apdu_get_atr (slot, &atrlen);
if (atr)
{
if (atrlen == 21 && atr[2] == 0x11)