summaryrefslogtreecommitdiff
path: root/system/coolkey/patches/coolkey-pcsc-lite-fix.patch
blob: f528676bbc0231b0e9845cdb8c05e92e9b3ad282 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
diff -up ./src/coolkey/slot.cpp.reader-state-fix ./src/coolkey/slot.cpp
--- ./src/coolkey/slot.cpp.reader-state-fix	2010-09-08 13:25:14.479109000 -0700
+++ ./src/coolkey/slot.cpp	2010-09-08 13:25:14.506109000 -0700
@@ -2185,6 +2185,7 @@ Slot::readCACCertificateFirst(CKYBuffer 
 {
     CKYStatus status;
     CKYISOStatus apduRC;
+    *nextSize = 0;
 
     if (mOldCAC) {
 	/* get the first 100 bytes of the cert */
diff -up ./src/libckyapplet/cky_card.c.reader-state-fix ./src/libckyapplet/cky_card.c
--- ./src/libckyapplet/cky_card.c.reader-state-fix	2010-09-08 14:05:10.859321000 -0700
+++ ./src/libckyapplet/cky_card.c	2010-09-08 14:05:42.792257000 -0700
@@ -27,7 +27,6 @@
 
 #ifndef WINAPI
 #define WINAPI
-typedef SCARD_READERSTATE *LPSCARD_READERSTATE;
 #endif
 
 #ifndef SCARD_E_NO_READERS_AVAILABLE
diff -up ./src/libckyapplet/cky_card.h.reader-state-fix ./src/libckyapplet/cky_card.h
--- ./src/libckyapplet/cky_card.h.reader-state-fix	2006-06-09 11:44:17.000000000 -0700
+++ ./src/libckyapplet/cky_card.h	2010-09-08 13:25:14.518109000 -0700
@@ -41,23 +41,23 @@ CKYLIST_DECLARE(CKYReaderName, char *)
 CKYLIST_DECLARE(CKYCardConnection, CKYCardConnection *)
 
 CKY_BEGIN_PROTOS
-void CKYReader_Init(SCARD_READERSTATE_A *reader);
-void CKYReader_FreeData(SCARD_READERSTATE_A *reader);
+void CKYReader_Init(SCARD_READERSTATE *reader);
+void CKYReader_FreeData(SCARD_READERSTATE *reader);
 
 /*
- * "Accessors": for SCARD_READERSTATE_A structure as a class.
- * These functions take an SCARD_READERSTATE_A which can also be referenced
+ * "Accessors": for SCARD_READERSTATE structure as a class.
+ * These functions take an SCARD_READERSTATE which can also be referenced
  * directly.
  */
-CKYStatus CKYReader_SetReaderName(SCARD_READERSTATE_A *reader, const char *name);
-const char *CKYReader_GetReaderName(const SCARD_READERSTATE_A *reader);
-CKYStatus CKYReader_SetKnownState(SCARD_READERSTATE_A *reader, 
+CKYStatus CKYReader_SetReaderName(SCARD_READERSTATE *reader, const char *name);
+const char *CKYReader_GetReaderName(const SCARD_READERSTATE *reader);
+CKYStatus CKYReader_SetKnownState(SCARD_READERSTATE *reader, 
 						unsigned long state);
-unsigned long CKYReader_GetKnownState(const SCARD_READERSTATE_A *reader);
-unsigned long CKYReader_GetEventState(const SCARD_READERSTATE_A *reader);
-CKYStatus CKYReader_GetATR(const SCARD_READERSTATE_A *reader, CKYBuffer *buf);
+unsigned long CKYReader_GetKnownState(const SCARD_READERSTATE *reader);
+unsigned long CKYReader_GetEventState(const SCARD_READERSTATE *reader);
+CKYStatus CKYReader_GetATR(const SCARD_READERSTATE *reader, CKYBuffer *buf);
 /* create an array of READERSTATEs from a LIST of Readers */
-SCARD_READERSTATE_A *CKYReader_CreateArray(const CKYReaderNameList readerNames, 
+SCARD_READERSTATE *CKYReader_CreateArray(const CKYReaderNameList readerNames, 
 					  unsigned long *readerCount);
 /* frees the reader, then the full array */
 void CKYReader_DestroyArray(SCARD_READERSTATE *reader, unsigned long count);
@@ -88,7 +88,7 @@ CKYStatus CKYCardContext_FindReadersByAT
 				const CKYBuffer *targetATR);
 /* return if any of the readers in our array has changed in status */
 CKYStatus CKYCardContext_WaitForStatusChange(CKYCardContext *context,
-				SCARD_READERSTATE_A *readers,
+				SCARD_READERSTATE *readers,
 				unsigned long readerCount,
 				unsigned long timeout);
 /* cancel any current operation (such as wait for status change) on this