* Cannot login into emulated smartcard with OpenSC because it expects external PIN pad.
@ 2019-09-21 8:54 Andrei Borzenkov
2019-09-21 14:05 ` Thomas Huth
0 siblings, 1 reply; 2+ messages in thread
From: Andrei Borzenkov @ 2019-09-21 8:54 UTC (permalink / raw)
To: qemu-devel
USB card reader emulated by QEMU announces presence of PIN pad. OpenSC
will not request PIN from user in this case and assumes PIN is being
entered off-band on external device. Unfortunately QEMU does not seem to
offer PIN entry and access to card always fails.
Changing device to not announce non-existing capability fixes it and
allows to use OpenSC framework with emulated card.
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -398,7 +398,7 @@ static const uint8_t qemu_ccid_descriptor[] = {
* u16 wLcdLayout; XXYY Number of lines (XX) and
chars per
* line for LCD display used for PIN entry. 0000 -
no LCD
*/
- 0x01, /*
+ 0x00, /*
* u8 bPINSupport; 01h PIN Verification,
* 02h PIN Modification
*/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Cannot login into emulated smartcard with OpenSC because it expects external PIN pad.
2019-09-21 8:54 Cannot login into emulated smartcard with OpenSC because it expects external PIN pad Andrei Borzenkov
@ 2019-09-21 14:05 ` Thomas Huth
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Huth @ 2019-09-21 14:05 UTC (permalink / raw)
To: Andrei Borzenkov, qemu-devel; +Cc: Gerd Hoffmann
On 21/09/2019 10.54, Andrei Borzenkov wrote:
> USB card reader emulated by QEMU announces presence of PIN pad. OpenSC
> will not request PIN from user in this case and assumes PIN is being
> entered off-band on external device. Unfortunately QEMU does not seem to
> offer PIN entry and access to card always fails.
>
> Changing device to not announce non-existing capability fixes it and
> allows to use OpenSC framework with emulated card.
>
> --- a/hw/usb/dev-smartcard-reader.c
> +++ b/hw/usb/dev-smartcard-reader.c
> @@ -398,7 +398,7 @@ static const uint8_t qemu_ccid_descriptor[] = {
> * u16 wLcdLayout; XXYY Number of lines (XX) and
> chars per
> * line for LCD display used for PIN entry. 0000 -
> no LCD
> */
> - 0x01, /*
> + 0x00, /*
> * u8 bPINSupport; 01h PIN Verification,
> * 02h PIN Modification
> */
Hi,
when sending patches, please make sure to include a "Signed-off-by:"
line at the end of the patch description. For details see:
https://wiki.qemu.org/Contribute/SubmitAPatch
Thanks,
Thomas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-09-21 14:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-21 8:54 Cannot login into emulated smartcard with OpenSC because it expects external PIN pad Andrei Borzenkov
2019-09-21 14:05 ` Thomas Huth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).