From: Douglas E E. <dee...@gm...> - 2017-09-06 17:06:13
|
It sound like you are trying to write a software version of a smart card and interface at the USB level using the qemu code as a starting point? You might want to Google for: software emulation of smart cards There are a number of these available including: https://github.com/frankmorgner/vsmartcard There is also : http://www.softhsm.org/ which implements a software version of smart card but at a PKCS#11 module. On 9/6/2017 9:36 AM, Anton Gerasimov wrote: > I don't have a physical token, what I'm trying to do is to emulate one > using (approximately) this manual [1]. Unfortunately Qemu seems to be > able to emulate just that one device type, so I don't have much choise here. > > After some new tries pcscd gives some output that as far as I understand > indicates that it has made contact to the virtual card (attached), but > opensc-tool still only shows OpenCT readers. > > 'opensc-tool -a' doesn't show anything useful as well: > $ opensc-tool -a > Card not present. > > Regarding the versions: > > OpenSC: 0.16.0 > OS: Linux v4.4.60 (Openembedded/Yocto build). > OpenCT: 0.6.20 > PCSClite: 1.8.13 > > Thanks, > Anton > > [1]: https://github.com/qemu/qemu/blob/master/docs/ccid.txt > On 09/06/2017 03:51 PM, Douglas E Engert wrote: >> Your command only list the readers, and it also says you are using the >> OpenCT >> rather the PCSClite. >> >> What versions of software are you using? >> OpenSC, OS, OpenCT, PCSClite? >> >> You said you are trying to use qemu. I use virtual Box, which presents >> to the >> virtual machine the real ID of a reader. I am not sure if qemu does >> that or presents >> a generic reader with ID 08e6:4433. >> >> The lsusb just says what type of reader. Are you using some token with >> a built in reader? >> If so what is it? >> >> What token are you using? The OpenSC driver Gemplus-GPK-16k is very >> old and was a card. >> >> >> to list the atr, try: >> opensc-tool -a >> >> Also look at using OpenSC debug in config file see: >> >> https://github.com/OpenSC/OpenSC/wiki/Using-OpenSC >> >> >> On 9/6/2017 7:48 AM, Anton Gerasimov wrote: >>> Hi, >>> >>> I'm trying to get OpenSC working with qemu (qemu-system-x86_64). It >>> emulates Gemplus token (lsusb output: 'ID 08e6:4433 Gemalto (was >>> Gemplus) GemPC433-Swap'), and it is unclear to me if it is supported in >>> OpenSC. It is listed as unsupported hardware [1], but the page for >>> Gemplus itself says it is supported [2]. >>> >>> If it is not, I would be grateful for any hints about how qemu and >>> OpenSC can be put to work together. opensc-tool --list-readers currently >>> gives >>> >>> # Detected readers (openct) >>> Nr. Card Features Name >>> 0 No OpenCT reader (detached) >>> 1 No OpenCT reader (detached) >>> >>> which as far as I understands means it can't detect any devices. >>> >>> Thanks, >>> Anton Gerasimov >>> >>> [1] >>> https://github.com/OpenSC/OpenSC/wiki/Supported-hardware-(smart-cards-and-USB-tokens) >>> >>> [2] https://github.com/OpenSC/OpenSC/wiki/Gemplus-GPK-16k >>> >> > -- Douglas E. Engert <DEE...@gm...> |