libcacard: correct T0 historical bytes size
authorMarc-André Lureau <mlureau@redhat.com>
Sun, 2 Dec 2012 21:00:55 +0000 (22:00 +0100)
committerAlon Levy <alevy@redhat.com>
Wed, 24 Apr 2013 08:47:31 +0000 (11:47 +0300)
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

Signed-off-by: Marc-André Lureau <mlureau@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
libcacard/vcardt.h

index d3e9522..538bdde 100644 (file)
@@ -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', '_'