summaryrefslogtreecommitdiffstats
path: root/scd
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2013-03-21 01:04:13 +0100
committerNIIBE Yutaka <gniibe@fsij.org>2013-03-21 01:09:41 +0100
commitca66f5c779af74d0eb7221afd7a9707201931e50 (patch)
tree80a87757490f272a233dbe76d6861a2744cb3f34 /scd
parentMerge branch 'master' into key-storage-work (diff)
downloadgnupg2-ca66f5c779af74d0eb7221afd7a9707201931e50.tar.xz
gnupg2-ca66f5c779af74d0eb7221afd7a9707201931e50.zip
scd: change default value of pinpad maxlen.
* 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.
Diffstat (limited to 'scd')
-rw-r--r--scd/apdu.c4
-rw-r--r--scd/ccid-driver.c7
2 files changed, 6 insertions, 5 deletions
diff --git a/scd/apdu.c b/scd/apdu.c
index 6824ded55..e920678d6 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -2056,7 +2056,7 @@ pcsc_pinpad_verify (int slot, int class, int ins, int p0, int p1,
if (!pininfo->minlen)
pininfo->minlen = 1;
if (!pininfo->maxlen)
- pininfo->maxlen = 25;
+ pininfo->maxlen = 15;
/* Note that the 25 is the maximum value the SPR532 allows. */
if (pininfo->minlen < 1 || pininfo->minlen > 25
@@ -2139,7 +2139,7 @@ pcsc_pinpad_modify (int slot, int class, int ins, int p0, int p1,
if (!pininfo->minlen)
pininfo->minlen = 1;
if (!pininfo->maxlen)
- pininfo->maxlen = 25;
+ pininfo->maxlen = 15;
/* Note that the 25 is the maximum value the SPR532 allows. */
if (pininfo->minlen < 1 || pininfo->minlen > 25
diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index da5fac954..8c9176762 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -3357,7 +3357,7 @@ ccid_transceive_secure (ccid_driver_t handle,
if (!pininfo->minlen)
pininfo->minlen = 1;
if (!pininfo->maxlen)
- pininfo->maxlen = 25;
+ pininfo->maxlen = 15;
/* Note that the 25 is the maximum value the SPR532 allows. */
if (pininfo->minlen < 1 || pininfo->minlen > 25
@@ -3371,14 +3371,15 @@ ccid_transceive_secure (ccid_driver_t handle,
{
case VENDOR_SCM: /* Tested with SPR 532. */
case VENDOR_KAAN: /* Tested with KAAN Advanced (1.02). */
- case VENDOR_FSIJ: /* Tested with the gnuk code (2011-01-05). */
+ case VENDOR_FSIJ: /* Tested with Gnuk (0.21). */
+ pininfo->maxlen = 25;
enable_varlen = 1;
break;
case VENDOR_VASCO: /* Tested with DIGIPASS 920 */
enable_varlen = 1;
- pininfo->maxlen = 15;
break;
case VENDOR_CHERRY:
+ pininfo->maxlen = 25;
enable_varlen = 1;
/* The CHERRY XX44 keyboard echos an asterisk for each entered
character on the keyboard channel. We use a special variant