Fix pinpad input support for passphrase modification. (backport)
authorNIIBE Yutaka <gniibe@fsij.org>
Fri, 2 Dec 2011 04:57:12 +0000 (13:57 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 25 Jun 2012 01:04:23 +0000 (10:04 +0900)
commit196a60078ba244d52219a5dc3acde1156d134290
treeb11a8a4d408444c2aae5f9106aa25c328492b7e7
parent056e1329b0938de75dbfeb3c60ed20c038086906
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.
scd/apdu.c
scd/app-openpgp.c
scd/iso7816.c
scd/iso7816.h