[svn] GnuPG - r4828 - trunk/scd
svn author wk
cvs at cvs.gnupg.org
Tue Sep 23 12:36:09 CEST 2008
Author: wk
Date: 2008-09-23 12:36:09 +0200 (Tue, 23 Sep 2008)
New Revision: 4828
Modified:
trunk/scd/ChangeLog
trunk/scd/ccid-driver.c
Log:
Untested fix for TPDU level exchange of large data (command chaining)
Modified: trunk/scd/ChangeLog
===================================================================
--- trunk/scd/ChangeLog 2008-09-23 09:57:45 UTC (rev 4827)
+++ trunk/scd/ChangeLog 2008-09-23 10:36:09 UTC (rev 4828)
@@ -9,6 +9,7 @@
(send_le): Implement command chaining.
* ccid-driver.c (ccid_transceive_apdu_level): Increase allowed
APDU size.
+ (ccid_transceive): Alow for APDUS of up to 259 bytes.
* apdu.h: Add new SW_ codes.
2008-09-16 Werner Koch <wk at g10code.com>
Modified: trunk/scd/ccid-driver.c
===================================================================
--- trunk/scd/ccid-driver.c 2008-09-23 09:57:45 UTC (rev 4827)
+++ trunk/scd/ccid-driver.c 2008-09-23 10:36:09 UTC (rev 4828)
@@ -1971,8 +1971,9 @@
apdulen = apdu_buflen;
assert (apdulen);
- /* The maximum length for a short APDU T=1 block is 261, for an
- extra APDU T=1 block is 65544. */
+ /* The maximum length for a short APDU T=1 block is 261. For an
+ extended APDU T=1 block the maximum length 65544; however
+ extended APDU exchange levele is not yet supported. */
if (apdulen > 261)
return CCID_DRIVER_ERR_INV_VALUE; /* Invalid length. */
@@ -2119,8 +2120,11 @@
assert (apdulen);
/* Construct an I-Block. */
-#warning fixme: APDULEN may be larger
- if (apdulen > 254)
+ /* Fixme: I am not sure whether limiting the length to 259
+ as per CCID spec is required. The code blow chops the
+ APDU anyway into 128 byte blocks. Needs to be addressed
+ when supporting extended length APDUs. */
+ if (apdulen > 259)
return CCID_DRIVER_ERR_INV_VALUE; /* Invalid length. */
tpdu = msg+10;
More information about the Gnupg-commits
mailing list