scd: PC/SC pinpad input improvement

NIIBE Yutaka gniibe at fsij.org
Tue Aug 27 03:51:13 CEST 2013


Sorry, I realized that following part won't work on Windows, because
of PCSC v2 PART10.

On 2013-08-27 at 10:40 +0900, NIIBE Yutaka wrote:
> This is the change to support pinpad input by PC/SC better.
> +/* Examine reader specific parameters and initialize.  This is mostly
> +   for pinpad input.  Called at opening the connection to the reader.  */
> +static int
> +pcsc_vendor_specific_init (int slot)
> +{
> +  sw = control_pcsc (slot, get_tlv_ioctl, NULL, 0, buf, &len);
[...]
> +      if (tag == PCSCv2_PART10_PROPERTY_bMinPINSize)
> +        reader_table[slot].pcsc.pinmin = v;
> +      else if (tag == PCSCv2_PART10_PROPERTY_bMaxPINSize)
> +        reader_table[slot].pcsc.pinmax = v;
> +      else if (tag == PCSCv2_PART10_PROPERTY_wIdVendor)
> +        vendor = v;
> +      else if (tag == PCSCv2_PART10_PROPERTY_wIdProduct)
> +        product = v;
[...]
> +  else if (vendor == 0x04e6 && product == 0xe003) /* SCM SPR532 */
> +    {
> +      reader_table[slot].is_spr532 = 1;
> +      reader_table[slot].pinpad_varlen_supported = 1;
> +    }

I think that we'd better to use reader_table[slot].rdrname.
-- 





More information about the Gnupg-devel mailing list