Aw: scd: change default value of pinpad maxlen
Alina Friedrichsen
x-alina at gmx.net
Wed Mar 20 20:35:48 CET 2013
Thanks, your patch works fine! :)
Is it possible to create a white list with all working readers
over pcscd? So that they don't need to set "enable-pinpad-varlen"?
gpg1 shows me:
gpg: detected reader `REINER SCT cyberJack RFID komfort (2111521960) 00 00'
gpg1 access the reader without root.
If I run "LANG=C gpg2 --card-status" with my user account it shows me:
gpg: selecting openpgp failed: Unsupported certificate
gpg: OpenPGP card not available: Unsupported certificate
With root it works fine.
Thanks again!
Alina
> Gesendet: Dienstag, 19. März 2013 um 03:44 Uhr
> Von: "NIIBE Yutaka" <gniibe at fsij.org>
> An: gnupg-devel at gnupg.org
> Betreff: scd: change default value of pinpad maxlen
>
> Hello,
>
> This is a change for STABLE-BRANCH-2-0 and master.
>
> The change in ccid-driver.c is to change default pinmax to 15, and let
> known-reader set specific value.
>
> The change in apdu.c is to change default pinmax to 15 (from 25),
> which is more likely. This is incompatible change, but there is no
> released version which support pinpad input with PC/SC yet.
>
> The code for PC/SC is better to use the new API of PC/SC:
> FEATURE_GET_TLV_PROPERTIES and bMaxPINSize. I'll try that in near
> future.
>
> I'll apply this, if no objections.
>
> diff --git a/scd/apdu.c b/scd/apdu.c
> index 196d58b..268c2fa 100644
> --- a/scd/apdu.c
> +++ b/scd/apdu.c
> @@ -2086,7 +2086,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
> @@ -2167,7 +2167,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 dd9fabe..c3a66fa 100644
> --- a/scd/ccid-driver.c
> +++ b/scd/ccid-driver.c
> @@ -3358,7 +3358,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
> @@ -3373,13 +3373,14 @@ 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 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
> --
>
>
>
> _______________________________________________
> Gnupg-devel mailing list
> Gnupg-devel at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-devel
>
More information about the Gnupg-devel
mailing list