aboutsummaryrefslogtreecommitdiffstats
path: root/scd/ccid-driver.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-11-27scd: Fix two compiler warnings.Werner Koch1-128/+128
* scd/apdu.c (pcsc_vendor_specific_init): Add suggested parens. * scd/ccid-driver.c (ccid_get_atr): Cast DEBUGOUT_1 arg to int.
2013-08-27scd: fix Vega for Alpha reader.NIIBE Yutaka1-2/+6
* scd/ccid-driver.c (ccid_vendor_specific_init): Fix error handling and size of command. -- Signed-off-by: NIIBE Yutaka
2013-04-23scd: Add pinpad support for REINER SCT cyberJack goNIIBE Yutaka1-1/+4
* scd/ccid-driver.c (VENDOR_REINER, CYBERJACK_GO): New. (ccid_transceive_secure): Handle the case for VENDOR_REINER. Original work was by Alina Friedrichsen (tiny change). -- This is revised version which adapts changes of ccid-driver.
2013-03-21scd: change default value of pinpad maxlen.NIIBE Yutaka1-2/+3
* scd/apdu.c (pcsc_pinpad_verify, pcsc_pinpad_modify): Default value of maxlen for pinpad input is now 15 (was: 25). * scd/ccid-driver.c (ccid_transceive_secure): Likewise. -- For newer PC/SC, it is better to use FEATURE_GET_TLV_PROPERTIES to get bMaxPINSize.
2013-03-14scd: ccid-driver supporting larger APDU.NIIBE Yutaka1-1/+1
* scd/ccid-driver.c (ccid_transceive_apdu_level): Support larger APDU. -- This is still ad hoc change, but it's OK. Supporting full extended APDU exchange level is not worth yet.
2013-02-08scd: Rename 'keypad' to 'pinpad'.NIIBE Yutaka1-1/+1
* NEWS: Mention scd changes. * agent/divert-scd.c (getpin_cb): Change message. * agent/call-scd.c (inq_needpin): Change the protocol to POPUPPINPADPROMPT and DISMISSPINPADPROMPT. * scd/command.c (pin_cb): Likewise. * scd/apdu.c (struct reader_table_s): Rename member functions. (check_pcsc_pinpad, pcsc_pinpad_verify, pcsc_pinpad_modify, check_ccid_pinpad, ccid_pinpad_operation, apdu_check_pinpad apdu_pinpad_verify, apdu_pinpad_modify): Rename. * scd/apdu.h (SW_HOST_NO_PINPAD, apdu_check_pinpad) (apdu_pinpad_verify, apdu_pinpad_modify): Rename. * scd/iso7816.h (iso7816_check_pinpad): Rename. * scd/iso7816.c (map_sw): Use SW_HOST_NO_PINPAD. (iso7816_check_pinpad): Rename. (iso7816_verify_kp, iso7816_change_reference_data_kp): Follow the change. * scd/ccid-driver.h (CCID_DRIVER_ERR_NO_PINPAD): Rename. * scd/ccid-driver.c (ccid_transceive_secure): Use it. * scd/app-dinsig.c (verify_pin): Follow the change. * scd/app-nks.c (verify_pin): Follow the change. * scd/app-openpgp.c (check_pinpad_request): Rename. (parse_login_data, verify_a_chv, verify_chv3, do_change_pin): Follow the change. * scd/scdaemon.c (oDisablePinpad, oEnablePinpadVarlen): Rename. * scd/scdaemon.h (opt): Rename to disable_pinpad, enable_pinpad_varlen. * tools/gpgconf-comp.c (gc_options_scdaemon): Rename to disable-pinpad.
2013-02-05SCD: Add vendor specific initalization.NIIBE Yutaka1-1/+29
* scd/ccid-driver.c (ccid_vendor_specific_init): New. (ccid_open_reader): Call ccid_vendor_specific_init.
2013-02-05SCD: Minor fix of ccid-driver.NIIBE Yutaka1-1/+1
* scd/ccid-driver.c (VENDOR_VEGA): Fix typo.
2013-02-05SCD: Add support of Covadis VEGA_ALPHA reader.NIIBE Yutaka1-93/+96
* scd/ccid-driver.c: Add 2013. (VENDER_VEGA, VEGA_ALPHA):New. (ccid_transceive_secure): VEGA_ALPHA is same firmware as GEMPC_PINPAD. Change bNumberMessage to 0x01, as it works better (was: 0xff).
2013-02-05SCD: Support fixed length PIN input for keypad (PC/SC).NIIBE Yutaka1-12/+4
* scd/apdu.c (pcsc_keypad_verify): SUpport fixed length PIN input for keypad. (pcsc_keypad_modify): Likewise. * scd/ccid-driver.c (ccid_transceive_secure): Clean up.
2013-02-05SCD: Support fixed length PIN input for keypad.NIIBE Yutaka1-12/+38
* scd/iso7816.h (struct pininfo_s): Remove MODE and add FIXEDLEN. * scd/app-dinsig.c (verify_pin): Initialize FIXEDLEN to unknown. * scd/app-nks.c (verify_pin): Likewise. * scd/app-openpgp.c (verify_a_chv, verify_chv3, do_change_pin): Likewise. * scd/apdu.c (check_pcsc_keypad): Add comment. (pcsc_keypad_verify, pcsc_keypad_modify): PC/SC driver only support readers with the feature of variable length input (yet). (apdu_check_keypad): Set FIXEDLEN. * scd/ccid-driver.c (ccid_transceive_secure): Add GEMPC_PINPAD specific settings. Support fixed length PIN input for keypad.
2013-02-05SCD: API cleanup for keypad handling.NIIBE Yutaka1-16/+21
* scd/iso7816.h (struct pininfo_s): Rename from iso7816_pininfo_s. Change meaning of MODE. (pininfo_t): Rename from iso7816_pininfo_t. * scd/sc-copykeys.c: Include "iso7816.h". * scd/scdaemon.c, scd/command.c: Likewise. * scd/ccid-driver.c: Include "scdaemon.h" and "iso7816.h". (ccid_transceive_secure): Follow the change of PININFO_T. * scd/app.c: Include "apdu.h" after "iso7816.h". * scd/iso7816.c (iso7816_check_keypad, iso7816_verify_kp) (iso7816_change_reference_data_kp): Follow the change of API. * scd/apdu.c (struct reader_table_s): Change API of CHECK_KEYPAD, KEYPAD_VERIFY, KEYPAD_MODIFY to have arg of PININFO_T. (check_pcsc_keypad, check_ccid_keypad): Likewise. (apdu_check_keypad, apdu_keypad_verify, apdu_keypad_modify): Likewise. (pcsc_keypad_verify, pcsc_keypad_modify, ct_send_apdu) (pcsc_send_apdu_direct, pcsc_send_apdu_wrapped, pcsc_send_apdu) (send_apdu_ccid, ccid_keypad_operation, my_rapdu_send_apdu, send_apdu) (send_le): Follow the change of API. * scd/apdu.h (apdu_check_keypad, apdu_keypad_verify) (apdu_keypad_modify): Change the API. * scd/app-dinsig.c, scd/app-nks.c, scd/app-openpgp.c: Follow the change.
2013-02-05SCD: Clean up. Remove PADLEN for keypad input.NIIBE Yutaka1-6/+2
* scd/apdu.c (struct pininfo_s): Use iso7816_pininfo_s. (struct reader_table_s): Remove last arg from check_keypad method. (check_pcsc_keypad, check_pcsc_keypad): Remove PIN_PADLEN. (pcsc_keypad_verify, pcsc_keypad_modify): Don't check PIN_PADLEN. (send_apdu_ccid, ccid_keypad_operation): Remove PIN_PADLEN. (apdu_check_keypad, apdu_keypad_verify, apdu_keypad_modify): Likewise. * scd/apdu.h (apdu_check_keypad, apdu_keypad_verify) (apdu_keypad_modify): Remove PIN_PADLEN. * scd/ccid-driver.c (ccid_transceive_secure): Remove PIN_PADLEN. * scd/ccid-driver.h (ccid_transceive_secure): Remove PIN_PADLEN. * scd/iso7816.c (iso7816_check_keypad, iso7816_verify_kp) (iso7816_change_reference_data_kp): Remove PADLEN. * scd/iso7816.h (struct iso7816_pininfo_s): Remove PADLEN, PADCHAR. -- In the OpenPGPcard specification, password comes with no padding. In GnuPG, we support keypad input for OpenPGPcard only. Thus, it is useless to try to support padding for keypad input.
2013-02-05SCD: Add option enable-keypad-varlen and support for GEMPC_PINPAD.NIIBE Yutaka1-0/+10
* scd/scdaemon.h (opt): Add enable_keypad_varlen. * scd/scdaemon.c (cmd_and_opt_values): Add oEnableKeypadVarlen. (opts, main): Add oEnableKeypadVarlen. * scd/ccid-driver.c (GEMPC_PINPAD): New. (ccid_transceive_secure): Add enable_varlen handling. Enable GEMPC_PINPAD. -- Note that GEMPC_PINPAD doesn't support variable length keypad input. The feature of fixed length keypad input will be added soon.
2013-02-05SCD: Support not-so-smart card readers.NIIBE Yutaka1-37/+253
* 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.
2012-07-20scd: Add forgotten VENDOR_FSIJ to ccid-driver.NIIBE Yutaka1-0/+1
* scd/ccid-driver.c (ccid_transceive_secure): Handle VENDOR_FSIJ.
2012-06-25Merge ccid_driver_improvement branch. (backport)NIIBE Yutaka1-28/+106
* scd/apdu.c (ccid_keypad_operation): Rename from ccid_keypad_verify. (open_ccid_reader): Use ccid_keypad_operation for verify and modify. * scd/ccid-driver.c (VENDOR_VASCO, VASCO_920): New. (ccid_transceive_apdu_level): Permit sending packet where apdulen <= 289. Support receiving packets in a chain. (ccid_transceive_secure): Maximum is 15 for VASCO DIGIPASS 920. Support keypad_modify method such as CHANGE_REFERENCE_DATA: 0x24.
2012-06-25Support the Cherry ST-2000 card reader.Werner Koch1-12/+27
* scd/ccid-driver.c (SCM_SCR331, SCM_SCR331DI, SCM_SCR335) (SCM_SCR3320, SCM_SPR532, CHERRY_ST2000): New constants. (parse_ccid_descriptor): Use them. (scan_or_find_usb_device, ccid_transceive_secure): Handle Cherry ST-2000. Suggested by Matthias-Christian Ott. Conflicts: scd/ccid-driver.c
2012-06-25fix wLangId in ccid-driver.cNIIBE Yutaka1-2/+2
This is not a part of pin pad support series of mine. As I found the bug while I am preparing the patches, I report this. As CCID protocol is little endian, wLangId of US English = 0x0409 is represented as two bytes of 0x09 then 0x04. It is really confusing that the code like following is floating around: pin_verify -> wLangId = HOST_TO_CCID_16(0x0904); But, it is 0x0409 (not 0x0904). It is defined in the documentation: http://www.usb.org/developers/docs/USB_LANGIDs.pdf and origin of this table is Microsoft. We can see it at: http://msdn.microsoft.com/en-us/library/bb165625%28VS.80%29.aspx Yes, it would be better not to hard-code 0x0409. It would be better to try current locale of the user, or to use the first entry of string descriptor. I don't have time to implement such a thing...
2009-12-21A bunch of minor changesWerner Koch1-2/+2
2009-07-292009-07-29 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-1/+1
* ccid-driver.c (print_pr_data): Fix 64 bit compat problem.
2009-07-24Workaround for SCR3320Werner Koch1-0/+6
2009-07-21Make bug reporting address easier changeable.Werner Koch1-8/+31
2009-07-16Add code to better handle unplugging of a reader.Werner Koch1-9/+36
2009-07-13* ccid-driver.c (struct ccid_driver_s): Add fields last_progress,Werner Koch1-0/+38
progress_cb and progress_cb_arg. (ccid_set_progress_cb): New. (print_progress): New. (ccid_transceive): Call print_progress for wait time extensions. * apdu.c (struct reader_table_s): Add field set_progress_cb. (new_reader_slot): Clear that field. (open_ccid_reader): Set it to .. (set_progress_cb_ccid_reader): ... new fucntion. * app.c (print_progress_line): New. (lock_reader): Add arg CTRL to set a progress callback and change all callers to provide it. (unlock_reader): Remove the progress callback.
2009-07-01Add comment about Cherry.Werner Koch1-2/+6
2009-06-30OOps commited an old version. Fixed now.Werner Koch1-2/+2
2009-06-30small fix for Omnikey. Works with CM4040 now.Werner Koch1-0/+2
2009-06-29Make soem omnikey readers work with extended length APDUs.Werner Koch1-57/+139
2009-05-13Improved smartcard robustness.Werner Koch1-21/+15
2009-05-08More support for Netkey cards.Werner Koch1-31/+62
Small changes to teh CCID driver. Support 2048 bit OpenPGP cards.
2009-03-30Implement decryption for TCOS 3 cards.Werner Koch1-15/+35
2009-02-25Fixed a nasty bug in scdaemon which led to a card reset if the card wasWerner Koch1-1/+1
inserted during scdaemon startup and a connection was made before the ticker had a chance to run. Add some stuff for better debugging.
2009-02-24Better debug output.Werner Koch1-85/+420
2008-12-18Fixed some card related problems.Werner Koch1-3/+119
2008-11-03Fixed the card removed with cached app bug. (Famous last fix).Werner Koch1-1/+2
2008-10-20Marked all unused args on non-W32 platforms.Werner Koch1-1/+1
2008-09-23Untested fix for TPDU level exchange of large data (command chaining)Werner Koch1-4/+8
2008-09-23Support the Certifciate DO of the v2 OpenPGP cards.Werner Koch1-2/+5
2008-04-18Adjust for the changed Camellia draft.Werner Koch1-1/+1
W32 gettext changes. Comment and typo fixes.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-04-03Add a way to get a listing of available CCID readers.Werner Koch1-4/+13
2007-03-07The Cherry XX44 keyboard's PINpad does now work.Werner Koch1-18/+29
DINSIG and NKS card applications are now also PIN pad aware.
2007-01-31Included LIBICONV in all Makefiles.Werner Koch1-3/+6
g10/ * passphrase.c (passphrase_get): Set the cancel flag on all error from the agent. Fixes a bug reported by Tom Duerbusch. sm/ * gpgsm.c (main): Let --gen-key print a more informative error message.
2006-11-20Made some PIN pads work.Werner Koch1-24/+49
Some cleanups for 64 bit CPUs.
2006-03-01Fixed card removal problemsWerner Koch1-4/+17
2006-02-08Fixed a couple of problems with omnikey based readersWerner Koch1-20/+59
2006-02-06.Werner Koch1-1/+1
2006-02-06Support for CardMan 4040Werner Koch1-229/+488
2005-11-28Preparing an interim releaseWerner Koch1-10/+54