diff options
author | Werner Koch <wk@gnupg.org> | 2008-09-23 12:36:09 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2008-09-23 12:36:09 +0200 |
commit | 2693db33d035d0b99d693d166c9abb2c8fdaa9e4 (patch) | |
tree | 27c7133960455cc3619e66659ce8b7e17ed62908 /scd | |
parent | Support the Certifciate DO of the v2 OpenPGP cards. (diff) | |
download | gnupg2-2693db33d035d0b99d693d166c9abb2c8fdaa9e4.tar.xz gnupg2-2693db33d035d0b99d693d166c9abb2c8fdaa9e4.zip |
Untested fix for TPDU level exchange of large data (command chaining)
Diffstat (limited to 'scd')
-rw-r--r-- | scd/ChangeLog | 1 | ||||
-rw-r--r-- | scd/ccid-driver.c | 12 |
2 files changed, 9 insertions, 4 deletions
diff --git a/scd/ChangeLog b/scd/ChangeLog index d9ad2bfb0..2de918bb0 100644 --- a/scd/ChangeLog +++ b/scd/ChangeLog @@ -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@g10code.com> diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c index 899f7ae17..52a397927 100644 --- a/scd/ccid-driver.c +++ b/scd/ccid-driver.c @@ -1971,8 +1971,9 @@ ccid_transceive_apdu_level (ccid_driver_t handle, 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 @@ ccid_transceive (ccid_driver_t handle, 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; |