From b6c0f55dee51c131fc2e4154aae30693b88b4595 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Tue, 5 Mar 2013 15:35:24 +0200 Subject: [PATCH] libcacard: change default ATR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alon Levy Reviewed-by: Marc-André Lureau (cherry picked from commit a26dfd95d33d650f9f9f93b6ee6f03be925db1a8) --- libcacard/vcardt.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libcacard/vcardt.h b/libcacard/vcardt.h index 538bdde..3b9a619 100644 --- a/libcacard/vcardt.h +++ b/libcacard/vcardt.h @@ -26,9 +26,17 @@ typedef struct VCardEmulStruct VCardEmul; #define MAX_CHANNEL 4 /* create an ATR with appropriate historical bytes */ -#define VCARD_ATR_PREFIX(size) 0x3b, 0x66+(size), 0x00, 0xff, \ - 'V', 'C', 'A', 'R', 'D', '_' +#define TS_DIRECT_CONVENTION 0x3b +#define TA_PRESENT 0x10 +#define TB_PRESENT 0x20 +#define TC_PRESENT 0x40 +#define TD_PRESENT 0x80 +#define VCARD_ATR_PREFIX(size) \ + TS_DIRECT_CONVENTION, \ + TD_PRESENT + (6 + size), \ + 0x00, \ + 'V', 'C', 'A', 'R', 'D', '_' typedef enum { VCARD_DONE,