libcacard: correct T0 historical bytes size
PATCH 1/1 libcacard: correct T0 historical bytes size
The VCARD_ATR_PREFIX macro adds a prefix of 6 characters only.
pcsc_scan was complaining before the patch:
+ Historical bytes: 56 43 41 52 44 5F 4E 53 53 ERROR! ATR is truncated: 2 byte(s) is/are missing
--- libcacard/vcardt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
libcacard/vcardt.h +1 -1
@@ -26,7 +26,7 @@ typedef struct VCardEmulStruct VCardEmul;#define MAX_CHANNEL 4/* create an ATR with appropriate historical bytes */ -#define VCARD_ATR_PREFIX (size) 0x3b, 0x68+(size), 0x00, 0xff, \ +#define VCARD_ATR_PREFIX (size) 0x3b, 0x66+(size), 0x00, 0xff, \ 'V', 'C', 'A', 'R', 'D', '_'
Signature · 1 line
1.7.11.7
ping
Quoted 26 lines · Marc-André Lureau
The
VCARD_ATR_PREFIXmacro adds a prefix of 6 characters only.
pcsc_scanwas complaining before the patch:+ Historical bytes: 56 43 41 52 44 5F 4E 53 53 ERROR! ATR is truncated: 2 byte(s) is/are missing
--- libcacard/vcardt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)libcacard/vcardt.h +1
-2@@ -26,7 +26,7 @@ typedef struct VCardEmulStruct VCardEmul;#define MAX_CHANNEL 4/* create an ATR with appropriate historical bytes */ -#define VCARD_ATR_PREFIX (size) 0x3b, 0x68+(size), 0x00, 0xff, \ +#define VCARD_ATR_PREFIX (size) 0x3b, 0x66+(size), 0x00, 0xff, \ 'V', 'C', 'A', 'R', 'D', '_' --1.7.11.7
Signature · 1 line
Marc-André Lureau
A message that is not in the archive (sent off-list or not yet received): CAJ+F1CJbSSKqRzZmVoT4=Jw9g4Kqg6P_W_JuPxyHatshggMQag@mail.gmail.com
Alon Levy
Reviewed-byQuoted 1 line · Marc-André Lureau
ping
Works, thanks.
Quoted 44 lines
Quoted 35 lines · Marc-André Lureau
ping
Quoted 24 lines · Marc-André Lureau
The
VCARD_ATR_PREFIXmacro adds a prefix of 6 characters only.
pcsc_scanwas complaining before the patch:+ Historical bytes: 56 43 41 52 44 5F 4E 53 53 ERROR! ATR is truncated: 2 byte(s) is/are missing
--- libcacard/vcardt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)libcacard/vcardt.h +1
-2@@ -26,7 +26,7 @@ typedef struct VCardEmulStruct VCardEmul;#define MAX_CHANNEL 4/* create an ATR with appropriate historical bytes */ -#define VCARD_ATR_PREFIX (size) 0x3b, 0x68+(size), 0x00, 0xff, \ +#define VCARD_ATR_PREFIX (size) 0x3b, 0x66+(size), 0x00, 0xff, \ 'V', 'C', 'A', 'R', 'D', '_' --Quoted 2 lines
1.7.11.7
--
Marc-André LureauSignature · 1 line
Marc-André Lureau