scd-backport-2-0 branch

NIIBE Yutaka gniibe at fsij.org
Fri Jun 22 04:49:40 CEST 2012


Hello,

I backported SCD (scdaemon) related changes to scd-backport-2-0
branch.  If it doesn't have any problem, I'd like to merge it into
STABLE-BRANCH-2-0.

Here are changes incorporated into scd-backport-2-0.

commit a90f0fca554a679e1c09b0c11ed80311a9358a9d
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Jun 22 10:51:12 2012 +0900

    scd: Fix updating slot status.
    * scd/comman.c (do_reset): Let clear card_removed flag.

commit ff40c05e8b563471278cb7c92df0310bc5967749
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Mon Jun 18 15:08:01 2012 +0900

    scd: acquire lock in new_reader_slot.
    
    * scd/apdu.c (new_reader_slot): Acquire lock.
      (open_ct_reader, open_pcsc_reader_direct, open_pcsc_reader_wrapped)
      (open_ccid_reader, open_rapdu_reader): Release lock.
    
    --
    Fixes a test case of:
       No libpcsclite1 installed.
       Run gpg-agent
       Run command "gpg-connect-agent learn /bye" with no card/token
       Sometimes it fails: ERR 100663356 Not supported <SCD>
       While it should be always: ERR 100663404 Card error <SCD>

commit 7f3ea446609355c96e90f0b6beb057daa1152643
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Mon Jun 18 14:52:53 2012 +0900

    scd: move lock_slot, trylock_slot, unlock_slot functions.
    
    * scd/apdu.c (lock_slot, trylock_slot, unlock_slot): Move.
    
    --
    This is for upcoming changes.

commit 29b431fcf97a9e615d34a7a40e570e63834b360a
Merge: 3e39a9a cc13771
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Jun 15 16:50:45 2012 +0900

    Merge branch 'scd-backport-2-0' of git+ssh://playfair.gnupg.org/git/gnupg into scd-backport-2-0

commit 3e39a9aeaadd9d4ea7ea578dc77504bd1fd6e30a
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Jun 15 16:46:59 2012 +0900

    scd: Fix merge mistake.
    * scd/iso7816.c (iso7816_reset_retry_counter): Implement.

commit d138fe5c30c877856b4c397147bb0090705821f8
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Dec 15 21:45:35 2011 +0100

    scd: Prefer application Geldkarte over DINSIG.
    
    * scd/app.c (select_application): Reorder application tests.
    --
    
    Although the DINSIG application is available on most German cards, it
    is in reality not used.  Thus showing the Geldkarte application is
    more desirable for a good user experience.
    

commit 2586eac997911869008cb3ba57865a7d63a2afc3
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Dec 19 18:26:47 2011 +0100

    scd: Fix for card change returning GPG_ERR_CARD_RESET.
    
    * scd/apdu.c (apdu_connect): Do not test for zero atrlen.
    --
    When gpg-agent prompts for insertion of a card this error would be
    returned.
    
    Co-authored-by: Ben Kibbey <bjk at luxsci.net>

commit 685955444823a5ca1190b109043ee773bf206bae
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Jan 6 13:50:21 2012 +0900

    Merge ccid_driver_improvement branch. (backport)
    
    * 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.

commit f78cdf6d45708b67bc3d7bf7b90283254fdd23fd
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Dec 20 13:34:27 2011 +0900

    Add error log and debug log for pcsc_keypad_verify and pcsc_keypad_modify.
    
    * scd/apdu.c (pcsc_keypad_verify): Add debug log and error log.
    (pcsc_keypad_modify): Likewise.

commit 1b0968ce9a642671f902ceddbafb5af4fe51535b
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Dec 2 13:57:12 2011 +0900

    Fix pinpad input support for passphrase modification. (backport)
    
    * apdu.c (pcsc_keypad_verify): Have dummy Lc field with value 0.
    (pcsc_keypad_modify): Likewise.
    (pcsc_keypad_modify): It's only for ISO7816_CHANGE_REFERENCE_DATA.
    bConfirmPIN value is determined by the parameter p0.
    
    * app-openpgp.c (do_change_pin): The flag use_keypad should be 0 when
    reset_mode is on, or resetcode is on.  use_keypad only makes sense for
    iso7816_change_reference_data_kp.
    
    * iso7816.h (iso7816_put_data_kp): Remove.
    (iso7816_reset_retry_counter_kp): Remove.
    (iso7816_reset_retry_counter_with_rc_kp): Remove.
    (iso7816_change_reference_data_kp): Add an argument: IS_EXCHANGE.
    
    * iso7816.c (iso7816_put_data_kp): Remove.
    (iso7816_reset_retry_counter_kp): Remove.
    (iso7816_reset_retry_counter_with_rc_kp): Remove.
    (iso7816_change_reference_data_kp): Add an argument: IS_EXCHANGE.

commit b480f18e1de71766fc6b4fb3c50e157d0abffda5
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Thu Dec 1 11:09:51 2011 +0900

    scd: Fix pinpad input support (backport from master)
    
    * app-openpgp.c (do_change_pin): Fix pincb messages when
    use_keypad == 1.

commit 7cd8b12e25b6daabedf6fdc2f350327e2116fc78
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Nov 29 11:59:32 2011 +0900

    scd: PC/SC pinpad support (pinpad input for modify pass phrase). (backport)
    
    * iso7816.h (iso7816_change_reference_data_kp): Remove arguments
    of OLDCHV, OLDCHVLEN, NEWCHV, and NEWCHVLEN.
    
    * iso7816.c (iso7816_change_reference_data_kp): Call
    apdu_keypad_modify.
    (iso7816_change_reference_data): Don't call
    iso7816_change_reference_data_kp.
    
    * apdu.h (apdu_keypad_modify): New.
    
    * apdu.c (pcsc_keypad_modify, apdu_keypad_modify): New.
    (struct reader_table_s): New memeber function keypad_modify.
    (new_reader_slot, open_ct_reader, open_ccid_reader)
    (open_rapdu_reader): Initialize keypad_modify.
    
    * app-openpgp.c (do_change_pin): Handle keypad and call
    iso7816_change_reference_data_kp if it is the case.

commit 6dc187f2dbf3b5e7322fa40c7e085da12ad373d2
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Mon Nov 28 16:16:38 2011 +0900

    scd: PC/SC pinpad support.  (Backported from master.)
    
    * iso7816.h (iso7816_verify_kp): Remove arguments of CHV and CHVLEN.
    
    * iso7816.c (iso7816_verify_kp): Call apdu_keypad_verify. Only
    handle thecase with PININFO.
    (iso7816_verify): Call apdu_send_simple.
    
    * app-openpgp.c (verify_a_chv, verify_chv3): Follow the change of
    iso7816_verify_kp.
    
    * app-nks.c (verify_pin): Likewise.
    
    * app-dinsig.c (verify_pin): Likewise.
    
    * apdu.c: Include "iso7816.h".
    (struct reader_table_s): New memeber function keypad_verify.
    Add fields verify_ioctl and modify_ioctl in pcsc.
    (CM_IOCTL_GET_FEATURE_REQUEST, FEATURE_VERIFY_PIN_DIRECT)
    (FEATURE_MODIFY_PIN_DIRECT): New.
    (pcsc_control): New.
    (control_pcsc_direct, control_pcsc_wrapped, control_pcsc)
    (check_pcsc_keypad, pcsc_keypad_verify): New.
    (ccid_keypad_verify, apdu_keypad_verify): New.
    (new_reader_slot): Initialize with check_pcsc_keypad,
    pcsc_keypad_verify, verify_ioctl and modify_ioctl.
    (open_ct_reader): Initialize keypad_verify with NULL.
    (open_ccid_reader): Initialize keypad_verify.
    (open_rapdu_reader): Initialize keypad_verify with NULL.
    (apdu_open_reader): Initialize pcsc_control.
    
    * pcsc-wrapper.c (load_pcsc_driver): Initialize pcsc_control.
    (handle_control): New.
    (main): Handle the case 6 of handle_control.

commit cc13771675f83624a7d850b73f92e43e085b71c8
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Jun 13 09:35:41 2012 +0200

    Fix generated ChangeLog entry.
    
    --
    Finally Jim's git-fix-log thingy comes handy.

commit a3ae21162ae14a6a1661ef1a6937601f6914528b
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Jun 12 14:51:52 2012 +0900

    scd fixes on error.
    
    * scd/apdu.c (open_pcsc_reader_wrapped): Show error number.
    
    * scd/command.c (get_reader_slot): Return -1 on error.

commit 31584d3659497c0fff26f129c8c16a57a9e2330b
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Jun 8 13:18:06 2012 +0900

    scd: Fix the changes of scd/command.c
    
    * scd/command.c (do_reset): Assign slot after setting slot_table.

commit ffd7ebf62963adb044ee56f0e1b87be837b8f179
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Dec 14 10:30:01 2011 +0100

    scd: Fix resetting and closing of the reader.  (Backported by gniibe)
    
    * scd/command.c (update_card_removed): Do no act on an invalid VRDR.
    (do_reset): Ignore apdu_reset error codes for no and inactive card.
    Close the reader before setting the slot to -1.
    (update_reader_status_file): Notify the application before closing the
    reader.
    --
    
    With this change the scd now works as it did in the past.  In
    particular there is no more endless loop trying to open the reader by
    the update_reader_status_file ticker function.  That bug basically
    blocked all card operations until the scdaemon was killed.

commit fae87058eac21b41e6ec0ad6dca1f4b4f806ab73
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Dec 12 21:02:54 2011 +0100

    scd: Retry command SERIALNO for an inactive card.
    
    * scd/command.c (cmd_serialno): Retry once for an inactive card.

commit 775a5f4b92fde3151d0faa88fae2b8ccfbea2928
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Dec 12 20:34:12 2011 +0100

    Fix detection of card removal and insertion.
    
    * scd/apdu.c (apdu_connect): Return status codes for no card available
    and inactive card.
    * scd/command.c (TEST_CARD_REMOVAL): Also test for GPG_ERR_CARD_RESET.
    (open_card): Map apdu_connect status to GPG_ERR_CARD_RESET.

commit 08178d1e130a856622c0b938a34eb109bde79262
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Dec 2 18:09:58 2011 +0100

    Support the Cherry ST-2000 card reader.
    
    * 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.

commit dafa7aa621dfe36c5c6cf462d3ec0d6c614ab105
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Thu Jan 13 16:38:31 2011 +0900

    fix wLangId in ccid-driver.c
-- 





More information about the Gnupg-devel mailing list