Hello,
I hat the same problem. Please try this patch which fixed the problem for me.
Regards,
Bjarne
---
cjeca32/CCIDReader.cpp | 4 ++--
cjeca32/PCSC10.h | 16 ++++++++++++++--
debian/changelog | 8 ++++++++
debian/control | 3 ++-
doc/verifypin_ascii.c | 4 ++--
doc/verifypin_fpin2.c | 4 ++--
include/macosx/PCSC/reader.h | 16 ++++++++++++++--
7 files changed, 44 insertions(+), 11 deletions(-)
diff --git a/cjeca32/CCIDReader.cpp b/cjeca32/CCIDReader.cpp
index 1ab4135..c574868 100644
--- a/cjeca32/CCIDReader.cpp
+++ b/cjeca32/CCIDReader.cpp
@@ -3115,14 +3115,14 @@ RSCT_IFD_RESULT CCCIDReader::IfdVendor(uint32_t
IoCtrlCode,uint8_t *Input,uint32
case CJPCSC_VEN_IOCTRL_VERIFY_PIN_DIRECT:
if(InputLength<sizeof(PIN_VERIFY_STRUCTURE))
return STATUS_INVALID_BUFFER_SIZE;
-
if(InputLength!=sizeof(PIN_VERIFY_STRUCTURE)-sizeof(uint8_t)+((PIN_VERIFY_STRUCTURE
*)Input)->ulDataLength)
+
if(InputLength!=sizeof(PIN_VERIFY_STRUCTURE)-sizeof(PIN_VERIFY_STRUCTURE::abData)+((PIN_VERIFY_STRUCTURE
*)Input)->ulDataLength)
return STATUS_INVALID_BUFFER_SIZE;
return IfdVerifyPinDirect((PIN_VERIFY_STRUCTURE
*)Input,Output,OutputLength);
case CJPCSC_VEN_IOCTRL_MODIFY_PIN_DIRECT:
if(InputLength<sizeof(PIN_MODIFY_STRUCTURE))
return STATUS_INVALID_BUFFER_SIZE;
-
if(InputLength!=sizeof(PIN_MODIFY_STRUCTURE)-sizeof(uint8_t)+((PIN_MODIFY_STRUCTURE
*)Input)->ulDataLength)
+
if(InputLength!=sizeof(PIN_MODIFY_STRUCTURE)-sizeof(PIN_MODIFY_STRUCTURE::abData)+((PIN_MODIFY_STRUCTURE
*)Input)->ulDataLength)
return STATUS_INVALID_BUFFER_SIZE;
return IfdModifyPinDirect((PIN_MODIFY_STRUCTURE
*)Input,Output,OutputLength);
case CJPCSC_VEN_IOCTRL_SET_NORM:
diff --git a/cjeca32/PCSC10.h b/cjeca32/PCSC10.h
index 266c8ce..cea0b8c 100644
--- a/cjeca32/PCSC10.h
+++ b/cjeca32/PCSC10.h
@@ -26,7 +26,13 @@ typedef struct _PIN_VERIFY_STRUCTURE
uint8_t bMsgIndex; // Message index (should be 00)
uint8_t bTeoPrologue[3]; // T=1 I-block prologue field to use
(fill with 00)
uint32_t ulDataLength; // length of Data to be sent to
the ICC
- uint8_t abData[1]; // Data to send to the ICC
+ uint8_t abData
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+ [] /* valid C99 code */
+#else
+ [0] /* non-standard, but usually working code */
+#endif
+; // Data to send to the ICC
}PIN_VERIFY_STRUCTURE;
typedef struct _PIN_MODIFY_STRUCTURE
@@ -54,7 +60,13 @@ typedef struct _PIN_MODIFY_STRUCTURE
uint8_t bMsgIndex3; // Index of 3d prompting message
uint8_t bTeoPrologue[3]; // T=1 I-block prologue field to use
(fill with 00)
uint32_t ulDataLength; // length of Data to be sent to
the ICC
- uint8_t abData[1]; // Data to send to the ICC
+ uint8_t abData
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+ [] /* valid C99 code */
+#else
+ [0] /* non-standard, but usually working code */
+#endif
+ ; // Data to send to the ICC
}PIN_MODIFY_STRUCTURE;
#pragma pack ()
diff --git a/debian/changelog b/debian/changelog
index b5d52d4..6d4b654 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+pcsc-cyberjack (3.99.5final.sp05-1+dBjP-1) unstable; urgency=low
+
+ [ Bjarne Pohlers ]
+
+ * Fix for changed data structure in /usr/include/PCSC/reader.h
+
+ -- Bjarne Pohlers <[email protected]> Tue, 29 Apr 2014 11:53:01 +0200
+
pcsc-cyberjack (3.99.5final.sp05-1) unstable; urgency=low
[ Frank Neuber ]
diff --git a/debian/control b/debian/control
index ef6bcbb..6929d1d 100644
--- a/debian/control
+++ b/debian/control
@@ -18,7 +18,8 @@ Vcs-Browser:
http://anonscm.debian.org/gitweb/?p=collab-maint/pcsc-cyberjack.git
Package: libifd-cyberjack6
Architecture: any
-Depends: pcscd, ${misc:Depends}, ${shlibs:Depends}
+Depends: pcscd(>=1.8.11-1), ${misc:Depends}, ${shlibs:Depends}
+Conflicts: pcscd(<<1.8.11-1)
Provides: pcsc-ifd-handler
Suggests: pcsc-tools
Recommends:
diff --git a/doc/verifypin_ascii.c b/doc/verifypin_ascii.c
index c41d97b..d946c17 100644
--- a/doc/verifypin_ascii.c
+++ b/doc/verifypin_ascii.c
@@ -330,7 +330,7 @@ int main(int argc, char *argv[])
pin_verify -> abData[offset++] = 0x20; /* '\0' */
pin_verify -> ulDataLength = htonl(offset); /* APDU size */
- length = sizeof(PIN_VERIFY_STRUCTURE) + offset -1; /* -1 because
PIN_VERIFY_STRUCTURE contains the first byte of abData[] */
+ length = sizeof(PIN_VERIFY_STRUCTURE) + offset -
sizeof(PIN_VERIFY_STRUCTURE::abData); /* because PIN_VERIFY_STRUCTURE may
contain the first byte of abData[] */
printf(" command:");
for (i=0; i<length; i++)
@@ -463,7 +463,7 @@ int main(int argc, char *argv[])
pin_modify -> abData[offset++] = 0x30; /* '0' */
pin_modify -> ulDataLength = HOST_TO_CCID_32(offset); /* APDU size */
- length = sizeof(PIN_MODIFY_STRUCTURE) + offset -1; /* -1 because
PIN_MODIFY_STRUCTURE contains the first byte of abData[] */
+ length = sizeof(PIN_MODIFY_STRUCTURE) + offset
-sizeof(PIN_MODIFY_STRUCTURE::abData); /* because PIN_MODIFY_STRUCTURE may
contain the first byte of abData[] */;
printf(" command:");
for (i=0; i<length; i++)
diff --git a/doc/verifypin_fpin2.c b/doc/verifypin_fpin2.c
index 4ee4362..f236fdc 100644
--- a/doc/verifypin_fpin2.c
+++ b/doc/verifypin_fpin2.c
@@ -331,7 +331,7 @@ int main(int argc, char *argv[])
pin_verify -> abData[offset++] = 0xff; /* '\0' */
pin_verify -> ulDataLength = htonl(offset); /* APDU size */
- length = sizeof(PIN_VERIFY_STRUCTURE) + offset -1; /* -1 because
PIN_VERIFY_STRUCTURE contains the first byte of abData[] */
+ length = sizeof(PIN_VERIFY_STRUCTURE) + offset -
sizeof(PIN_VERIFY_STRUCTURE::abData); /* because PIN_VERIFY_STRUCTURE may
contain the first byte of abData[] */
printf(" command:");
for (i=0; i<length; i++)
@@ -464,7 +464,7 @@ int main(int argc, char *argv[])
pin_modify -> abData[offset++] = 0x30; /* '0' */
pin_modify -> ulDataLength = HOST_TO_CCID_32(offset); /* APDU size */
- length = sizeof(PIN_MODIFY_STRUCTURE) + offset -1; /* -1 because
PIN_MODIFY_STRUCTURE contains the first byte of abData[] */
+ length = sizeof(PIN_MODIFY_STRUCTURE) + offset
-sizeof(PIN_MODIFY_STRUCTURE::abData); /* because PIN_MODIFY_STRUCTURE may
contain the first byte of abData[] */
printf(" command:");
for (i=0; i<length; i++)
diff --git a/include/macosx/PCSC/reader.h b/include/macosx/PCSC/reader.h
index a451474..08614bb 100644
--- a/include/macosx/PCSC/reader.h
+++ b/include/macosx/PCSC/reader.h
@@ -168,7 +168,13 @@ typedef struct
uint8_t bMsgIndex; /**< Message index (should be 00) */
uint8_t bTeoPrologue[3]; /**< T=1 block prologue field to use (fill
with 00) */
uint32_t ulDataLength; /**< length of Data to be sent to the ICC */
- uint8_t abData[1]; /**< Data to send to the ICC */
+ uint8_t abData
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+ [] /* valid C99 code */
+#else
+ [0] /* non-standard, but usually working code */
+#endif
+ ; /**< Data to send to the ICC */
} PIN_VERIFY_STRUCTURE;
/** structure used with \ref FEATURE_MODIFY_PIN_DIRECT */
@@ -201,7 +207,13 @@ typedef struct
uint8_t bMsgIndex3; /**< index of 3d prompting message */
uint8_t bTeoPrologue[3]; /**< T=1 block prologue field to use (fill
with 00) */
uint32_t ulDataLength; /**< length of Data to be sent to the ICC */
- uint8_t abData[1]; /**< Data to send to the ICC */
+ uint8_t abData
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
+ [] /* valid C99 code */
+#else
+ [0] /* non-standard, but usually working code */
+#endif
+ ; /**< Data to send to the ICC */
} PIN_MODIFY_STRUCTURE;
/** structure used with \ref FEATURE_IFD_PIN_PROPERTIES */
--
2.0.0.rc0
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]