aboutsummaryrefslogtreecommitdiffstats
path: root/scd/iso7816.h
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2013-01-09 07:23:55 +0000
committerNIIBE Yutaka <[email protected]>2013-02-05 04:37:06 +0000
commit40a914a2e3052847b49c4b5e8ac8538e97efd18a (patch)
treef7387bd04fd0479e37801869f8bd699d44123daa /scd/iso7816.h
parentSCD: API cleanup for keypad handling. (diff)
downloadgnupg-40a914a2e3052847b49c4b5e8ac8538e97efd18a.tar.gz
gnupg-40a914a2e3052847b49c4b5e8ac8538e97efd18a.zip
SCD: Support fixed length PIN input for keypad.
* 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.
Diffstat (limited to 'scd/iso7816.h')
-rw-r--r--scd/iso7816.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/scd/iso7816.h b/scd/iso7816.h
index e6dfecd31..bf195ea00 100644
--- a/scd/iso7816.h
+++ b/scd/iso7816.h
@@ -34,7 +34,12 @@
ccid-driver.c for details. */
struct pininfo_s
{
- int mode; /* 0: Use variable length input. 1: Use fixed length input. */
+ int fixedlen; /*
+ * -1: Variable length input is not supported,
+ * no information of fixed length yet.
+ * 0: Use variable length input.
+ * >0: Fixed length of PIN.
+ */
int minlen;
int maxlen;
};