mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-12 21:58:50 +01:00
scd: Improve --enable-pinpad-varlen.
* tools/gpgconf-comp.c (gc_options_scdaemon): Add enable-pinpad-varlen. * scd/apdu.c (check_pcsc_pinpad): Detect SPRx32 reader. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
50c98c7ed6
commit
7bde2bf3b0
@ -290,10 +290,10 @@ than 0.
|
|||||||
@item --enable-pinpad-varlen
|
@item --enable-pinpad-varlen
|
||||||
@opindex enable-pinpad-varlen
|
@opindex enable-pinpad-varlen
|
||||||
Please specify this option when the card reader supports variable
|
Please specify this option when the card reader supports variable
|
||||||
length input for pinpad (default is no). For known readers listed in
|
length input for pinpad (default is no). For known readers (listed in
|
||||||
ccid-driver, this option is not needed. Note that if your card reader
|
ccid-driver.c and apdu.c), this option is not needed. Note that if
|
||||||
doesn't supports variable length input but you want to use it, you
|
your card reader doesn't supports variable length input but you want
|
||||||
need to specify your pinpad request on your card.
|
to use it, you need to specify your pinpad request on your card.
|
||||||
|
|
||||||
|
|
||||||
@item --disable-pinpad
|
@item --disable-pinpad
|
||||||
|
@ -2002,7 +2002,13 @@ check_pcsc_pinpad (int slot, int command, pininfo_t *pininfo)
|
|||||||
pcsc_dword_t len = 256;
|
pcsc_dword_t len = 256;
|
||||||
int sw;
|
int sw;
|
||||||
|
|
||||||
(void)pininfo; /* XXX: Identify reader and set pininfo->fixedlen. */
|
/* Hack to identify the SCM SPR532 and SPR332 readers which support
|
||||||
|
variable length PIN input.
|
||||||
|
FIXME: Figure out whether there is a feature attribute for this.
|
||||||
|
Alternatively use the USB ids to detect known readers. */
|
||||||
|
if (reader_table[slot].rdrname
|
||||||
|
&& strstr (reader_table[slot].rdrname, "SPRx32"))
|
||||||
|
pininfo->fixedlen = 0;
|
||||||
|
|
||||||
check_again:
|
check_again:
|
||||||
if (command == ISO7816_VERIFY)
|
if (command == ISO7816_VERIFY)
|
||||||
|
@ -620,6 +620,10 @@ static gc_option_t gc_options_scdaemon[] =
|
|||||||
{ "disable-pinpad", GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME, GC_LEVEL_BASIC,
|
{ "disable-pinpad", GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME, GC_LEVEL_BASIC,
|
||||||
"gnupg", "do not use a reader's pinpad",
|
"gnupg", "do not use a reader's pinpad",
|
||||||
GC_ARG_TYPE_NONE, GC_BACKEND_SCDAEMON },
|
GC_ARG_TYPE_NONE, GC_BACKEND_SCDAEMON },
|
||||||
|
{ "enable-pinpad-varlen",
|
||||||
|
GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME, GC_LEVEL_BASIC,
|
||||||
|
"gnupg", "use variable length input for pinpad",
|
||||||
|
GC_ARG_TYPE_NONE, GC_BACKEND_SCDAEMON },
|
||||||
{ "card-timeout", GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME, GC_LEVEL_BASIC,
|
{ "card-timeout", GC_OPT_FLAG_NONE|GC_OPT_FLAG_RUNTIME, GC_LEVEL_BASIC,
|
||||||
"gnupg", "|N|disconnect the card after N seconds of inactivity",
|
"gnupg", "|N|disconnect the card after N seconds of inactivity",
|
||||||
GC_ARG_TYPE_UINT32, GC_BACKEND_SCDAEMON },
|
GC_ARG_TYPE_UINT32, GC_BACKEND_SCDAEMON },
|
||||||
|
Loading…
Reference in New Issue
Block a user