qemu/0230-libcacard-change-default-ATR.patch

43 lines
1.2 KiB
Diff
Raw Normal View History

From b3d57573e23a456b2c21f045b153e2c0a621f886 Mon Sep 17 00:00:00 2001
From: Alon Levy <alevy@redhat.com>
Date: Tue, 5 Mar 2013 15:35:24 +0200
Subject: [PATCH 230/241] libcacard: change default ATR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Alon Levy <alevy@redhat.com>
Reviewed-by: Marc-André Lureau <mlureau@redhat.com>
(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,
--
1.8.3.1