Parent Directory
|
Revision Log
| Links to HEAD: | (view) (download) (annotate) |
| Sticky Revision: |
IFDHGetCapabilities(): add support of SCARD_ATTR_VENDOR_NAME
add support for SCARD_ATTR_VENDOR_IFD_VERSION tag used by SCardGetAttrib()
remove trailing spaces at end of lines
IFDHICCPresence(): correctly support the removal and insertion between two consecutive IFDHICCPresence() calls
IFDHCreateChannelByName(): add a "warm up" sequence. This sequence is sometimes needed when pcscd is restarted with the reader already connected. We get some "usb_bulk_read: Resource temporarily unavailable" on the first few tries. It is an empirical hack
IFDHICCPresence(): check the value returned by CmdEscape() in the SCR331-DI contactless reader familly code. Byg detected by using __attribute__((warn_unused_result)) also used as __must_check by the Linux kernel
use ntohl/htonl from arpa/inet.h since the tag value for IOCTL_FEATURE_VERIFY_PIN_DIRECT and IOCTL_FEATURE_MODIFY_PIN_DIRECT _shall_ be encoded in big endian as documented in PCSC v2 part 10 ch 2.2 page 2. The applications using this feature shall be updated (to respect the PCSC specification) Thanks to Ulrich Vogl for the bug report
use LPSTR instead of LPTSTR (deprecated)
declare the functions to export as EXTERNAL
#include "misc.h" so that ifdhandler.h functions are declared EXTERNAL
add support for SCM SDI 010 contactless reader thanks to Oleg Makarenko for the patch
IFDHSetProtocolParameters(): if the card is in specific mode and request a speed not supported by the reader we return IFD_COMMUNICATION_ERROR instead of IFD_PROTOCOL_NOT_SUPPORTED so that pcsc-lite do not try to talk to the card
IFDHSetProtocolParameters(): store the card protocol in ccid_desc->cardProtocol
IFDHSetProtocolParameters(): exit the while if you find a correct speed in the case of a card too fast
IFDHSetProtocolParameters(): if the card is faster than the reader (TA1=97 for example) we try to use a no so bad speed (corresponding to TA1=96, 95 or 94) instead of the default speed of TA1=11
allow to select the power on voltage using Info.plist instead of recompiling the source code
typo in a comment
Avoid a possible division by 0 if f or d parameter is null. This could happen only with non-ISO cards with TA1=0x00 or other undefined values
remove PCSC/ from the pcsc-lite #include header files since the PCSC/ part is already given by `pkg-config --cflags libpcsclite`
IFDHGetCapabilities(): use info instead of comm debug level to print the number of slots supported by the reader
IFDHControl(): use sizeof(PCSC_TLV_STRUCTURE) instead of 6
add support of PC/SC v2 part 10 CM_IOCTL_GET_FEATURE_REQUEST add support of FEATURE_VERIFY_PIN_DIRECT and FEATURE_MODIFY_PIN_DIRECT remove support of IOCTL_SMARTCARD_VENDOR_VERIFY_PIN (now obsoleted)
IFDHControl(): having a NULL RxBuffer is not an error since it is enough to send the code in dwControlCode Thanks to Martin Paljak for the patch
#include <PCSC/reader.h>
do not #include <math.h> since we now use +1 instead of ceil() to round
the calculated timeouts to the upper integer
- we do not need an mathematical exact value. the {usb,serial}read must
just not timeout before the reader firmware timeouts
- we avoid a dependency/link on the math library
T0_card_timeout(): use intermediate variables EGT, BWT, CWT, etu to improve code readability
T0_card_timeout(): declare EGT, WWT as double instead of int to have some precision We also calculate EGT and WWT in milliseconds instead of seconds
IFDHCreateChannelByName(), T0_card_timeout(), T1_card_timeout(): also include other card parameters (TC1 for T=0, TC1 and CWI for T=1) in the timeout formula
IFDHICCPresence(): add support of SCR331-DI NTTCom Thanks to Takuto Matsuu fro the patch
T0_card_timeout()/T1_card_timeout(): use ceil() to round the timeout
IFDHSetProtocolParameters(): check if the baud rate is present in the baud rates list only if the list is present. Otherwise we use the old behavior.
IFDHSetProtocolParameters(): we do not check if (card_baudrate <= ccid_desc->dwMaxDataRate) since find_baud_rate() will tell us if the speed is supported or not by the reader
calculate and store the read timeout according to the card ATR instead of using a fixed value of 60 seconds
add T0_card_timeout() and T1_card_timeout()
IFDHSetProtocolParameters(): only use a data rate supported by the reader in the PPS negociation, otherwise we stay at the default speed.
extra_egt(): rewrite the function comment
extra_egt(): reuse the same baud rate calculation formula
extra_egt(): change two if() in one
change comments: TBi (i>2) is BWI/CWI not BWI/BCI
extra_egt(): some (bogus) cards require an extra EGT but the ATR does not say so. We try to detect the bogus cards and set TC1=2
light code reformating
init_driver(): use DEBUG_INFO2() instead of debug_msg()
change licence from GNU GPL to GNU LGPL
use ATR_t instead of ATR
IFDHSetProtocolParameters(): return immediately if the reader has the bit CCID_CLASS_AUTO_PPS_PROP set since he will perform PPS and SetParameters himself
IFDHSetProtocolParameters(): calculate the value of pps[2] (TA1) even if CCID_CLASS_AUTO_PPS_CUR bit is set and no PPS will be generated by the driver since this value is also used later by the SetParameters()
IFDHSetProtocolParameters(): use "card_baudrate <= ccid_desc->dwMaxDataRate" instead of "card_baudrate < ccid_desc->dwMaxDataRate" to not miss the maximum speed value
mask bStatus to get the ICC state since bSatus may also indicate an error in b6-b7
IFDHSetProtocolParameters(): return the result value of SetParameters() in case of error instead of always IFD_COMMUNICATION_ERROR. This will allow to return IFD_NOT_SUPPORTED in some cases and avoid a PTS negociation failure (and card ignored) in pcscd.
IFDHSetProtocolParameters(): the bmTCCKST bits shall be _set_ not cleared
IFDHSetProtocolParameters(): we shall indicate the T=1 checksum used (LRC/CRC) in the SetParameters() command
IFDHICCPresence(): periodic debug message indicating the card presence/absence
use a much cleaner way to check presence of a contactless card with a multislot SCR331-DI reader
IFDHICCPresence(): call get_ccid_descriptor() on reader_index instead of Lun
FDHGetCapabilities() tag TAG_IFD_SLOT_THREAD_SAFE: Can NOT talk to multiple slots at the same time (at least until it is fully validated)
IFDHCreateChannel()/IFDHCreateChannelByName(): if the OpenPort() call fails we ReleaseReaderIndex() and do not call ccid_open_hack()
remove defaultFeatures management (was used for SCR331-DI hack)
use reader_index instead of lun as reader identification allocate (in IFDHCreateChannel*) and release (in IFDHCloseChannel)
hack to support the SCR331-DI contactless interface
update IFDHControl() prototype to replace LPVOID by PUCHAR (prototype changed in pcsc-lite-1.2.9-beta5)
BUG: I forgot to initialise the t1.lun field. It failed to work with more than one readers and a T=1 card in a TPDU reader.
init_driver(): use base 0 instead of 16 in strtoul() so that you can express the decimal value 15 as: 15 (decimal), 0xF (hex) or 017 (octal)
rename PCSCLITE_MAX_READERS in CCID_DRIVER_MAX_READERS This value is not defined by pcsc-lite but is internal to the CCID driver. By default pcsc-lite supports the same number of readers (16).
explicitely cast the returned value as (void) if we don't use it
IFDHSetProtocolParameters(): test the return value of SetParameters()
mark unused arguments as /*@unused@*/ for splint
lun is (unsigned int) instead of (int) Avoid a warning by splint in #define LunToReaderIndex(Lun) (Lun>>16) Left operand of >> may be negative (int): lun >> 16
if DEBUG_LEVEL_PERIODIC is not set we temporaily remove DEBUG_LEVEL_COMM in IFDHICCPresence() to avoid having the low level debug every time pcscd test the card presence
- removed CardUp() and CardDown() - all the reader initialisation/negotiation is now done in IFDHSetProtocolParameters() (that's why you need pcsc-lite-1.2.9beta3)
add support for SCardGetAttrib(.., IOCTL_SMARTCARD_VENDOR_VERIFY_PIN, ..) to know if the reader supports SCardControl(.., IOCTL_SMARTCARD_VENDOR_VERIFY_PIN, ..)
recompile using gcc -pedantic and correct: - some C++ syntax comments - many signedness "problems"
add support for Secure PIN through SCardControl() (see sample code in examples/)
in CardUp():SetParameters() the default TA1 is 0x11
- add support of IOCTL_SMARTCARD_VENDOR_IFD_EXCHANGE in IFDHControl() - read ifdDriverOptions from Info.plist to limit the use of IOCTL_SMARTCARD_VENDOR_IFD_EXCHANGE (idea from Peter Williams)
in IFDHPowerICC() IFD_POWER_DOWN is just power down without a power up. Changed to be compliant with IFD Handler specifications.
reset ATR string (length = 0) when the card is powered down or not present
add SCARD_ATTR_ATR_STRING in addition to TAG_IFD_ATR in IFDHGetCapabilities()
new IFDHControl() API
during the first IFDHCreateChannel*() init_debug() is called to read the value of ifdLogLevel from the Info.plist
do not return before pthread_mutex_unlock() in IFDHCreateChannelByName()
also call ccid_open_hack() in IFDHCreateChannelByName()
T=1 context is initialized in CardUp(), not in IFDHCreateChannel()
revert to nearly previous version. - IFD_POWER_DOWN is power down and power up (cold reset) - IFD_RESET is power up (warm reset) - IFD_POWER_UP is power up
Reset action is power off and power on, not just power on
huge rework of CardUp()
Perform PPS and IFSD only if the reader does not do it automatically
use Protocol_T1_Negociate_IFSD() in CardUp()
add CardUp() and CardDown() for PowerOn and PowerOff actions
removed useless function name in debug messages since we use __FUNCTION__
add support of IFDHCreateChannelByName
add support of T=1 in TPDU mode
call ccid_open_hack() in IFDHCreateChannel() instead of in each OpenPort()
use an (int *) instead of a PDWORD for rx_length argument
add get_ccid_slot() function
remove function name from debug message since __FUNCTION__ is now used in DEBUG_* macro definition
return IFD_NOT_SUPPORTED instead of IFD_SUCCESS in functions doing nothing (yet) (IFDHSetCapabilities, IFDHSetProtocolParameters, IFDHControl);
set the result buffer length to 0 in IFDHControl()
use a updated version of acx_pthread.m4 needed for FreeBSD
add support of thread safe (APDU multiplexing on different readers)
use OpenPort instead of OpenUSB. move the complex TPDU management in commands.c (and use it only if reader does not support APDU mode)
Initial revision
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.
| ViewVC Help | |
| Powered by ViewVC 1.1.5 |