Fix pinpad input support for passphrase modification.
authorNIIBE Yutaka <gniibe@fsij.org>
Fri, 2 Dec 2011 04:57:12 +0000 (13:57 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Fri, 2 Dec 2011 04:57:12 +0000 (13:57 +0900)
commitbf37c32367ba149559385ee90b6435cef8bd6412
treefa2507fa48ebfec822932a48b94e989c75926383
parent29e96e6b9a8e68e6554dd48bc2ce68ae9525d29f
Fix pinpad input support for passphrase modification.

* 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.
scd/apdu.c
scd/app-openpgp.c
scd/iso7816.c
scd/iso7816.h