SCD: Support not-so-smart card readers.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 8 Jan 2013 06:22:31 +0000 (15:22 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 5 Feb 2013 05:03:01 +0000 (14:03 +0900)
commit2dbd347fbe9765e72041857a5922390e01cf95f1
tree1b5ee01fd9f6c832e1da97bcaff1b5612012be75
parente8ea10990d9b860d9f2863928887811f86c304b6
SCD: Support not-so-smart card readers.

* scd/ccid-driver.c (struct ccid_driver_s): Add auto_voltage,
auto_param, and auto_pps.
(parse_ccid_descriptor): Set auto_voltage, auto_param, and auto_pps.
Support non-autoconf readers.
(update_param_by_atr): New.
(ccid_get_atr): Use 5V for PowerOn when auto_voltage is not supported.
Use 0x10 when nonnull_nad for SetParameters.
Call update_param_by_atr for parsing ATR, and use param for
SetParameters.
Send PPS if reader requires it and card is negotiable.
When bNadValue in the return values of SetParameters == 0,
clear handle->nonnull_nad flag.
--
This change is to support more card readers by the internal driver.
Tested with 08e6:3478 Gemplus PinPad Smart Card Reader.
scd/ccid-driver.c