Skip to contentSkip to conversation

libcacard: correct T0 historical bytes size

PATCH In review Marc-André Lureau 2 participants 3 messages Dec 2, 2012 – Mar 5, 2013 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

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
index d3e9522..538bdde 100644
@@ -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
#1 lore raw

ping

Quoted 26 lines · Marc-André Lureau

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 -2
index d3e9522..538bdde 100644
@@ -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

Reviewed-by
#3 lore raw
Quoted 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_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 -2
index d3e9522..538bdde 100644
@@ -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é Lureau

Signature · 1 line
Marc-André Lureau