Date: Thu, 11 May 2017 11:02:30 +0200 From: Matthias Apitz <guru@unixarea.de> To: freebsd-usb@freebsd.org Subject: Re: GnuPG && card readers Message-ID: <20170511090230.GA26224@c720-r314251> In-Reply-To: <20170511065844.GA25086@c720-r314251> References: <20170509094729.GA3668@c720-r314251> <20170509213637.Horde.u9PInhb6UaNmyy2nhXlnMGr@webmail.leidinger.net> <20170510073903.GA2836@c720-r314251> <20170511065844.GA25086@c720-r314251>
next in thread | previous in thread | raw e-mail | index | archive | help
El día jueves, mayo 11, 2017 a las 08:58:44a. m. +0200, Matthias Apitz escribió: > > El día martes, mayo 09, 2017 a las 09:36:37p. m. +0200, Alexander Leidinger escribió: > > > > > It's not FreeBSD which needs the support. gnupg comes with the > > > drivers, FreeBSD only needs to see "a device on the bus", that's enough. > > > > > > Check out the ports security/opensc amd devel/libccid (and gnupg needs > > > to be build with the SCDAEMON option of the port). This will bring in > > > the pcsc-lite port as a depedency. Those are the "drivers" for USB > > > card readers if you want to use them beyond what gnupg will do. > > > > > > ... > > I installed the mentioned ports and enabled the start in /etc/rc.conf with > > pcscd_enable="YES" > > but this would make hang the system on startup/boot: > > 25038 1 S+ 0:00,02 /bin/sh /usr/local/etc/rc.d/pcscd start > 25043 1 S+ 0:00,01 /usr/local/sbin/pcscd > 25044 1 S+ 0:00,01 /usr/local/sbin/pcscd > interestingly to note: I have the exact same system (12-CURRENT r314251 and with same ports from my own pkg repository out of poudriere) in a VBOX machine; when I start there the pcscd in foreground and with --debug it says: root@r314251-amd64:~ # /usr/local/sbin/pcscd --debug --foreground 00000000 pcscdaemon.c:346:main() pcscd set to foreground with debug send to stdout 00000516 configfile.l:358:DBGetReaderList() Parsing conf file: /usr/local/etc/reader.conf.d 00000043 pcscdaemon.c:655:main() pcsc-lite 1.8.20 daemon ready. 00010018 hotplug_libusb.c:440:HPEstablishUSBNotifications() Driver ifd-ccid.bundle does not support IFD_GENERATE_HOTPLUG. Using active polling instead. 00000124 hotplug_libusb.c:449:HPEstablishUSBNotifications() Polling forced every 1 second(s) and a truss on the PID shows that is is really polling once every second: ... openat(AT_FDCWD,"/dev/ugen1.1",O_RDWR,00) = 7 (0x7) openat(AT_FDCWD,"/dev/ugen1.1",O_RDWR,00) = 8 (0x8) ioctl(8,USB_GET_PLUGTIME,0xdfdfcddc) = 0 (0x0) ioctl(7,USB_GET_CONFIG,0xdfdfce44) = 0 (0x0) close(8) = 0 (0x0) close(7) = 0 (0x0) openat(AT_FDCWD,"/dev/ugen1.1",O_RDWR,00) = 7 (0x7) openat(AT_FDCWD,"/dev/ugen1.1",O_RDWR,00) = 8 (0x8) ... On the other system, an Acer C720 netbook, it says only: root@c720-r314251:~ # /usr/local/sbin/pcscd --debug --foreground 00000000 pcscdaemon.c:346:main() pcscd set to foreground with debug send to stdout 00000550 configfile.l:358:DBGetReaderList() Parsing conf file: /usr/local/etc/reader.conf.d 00000049 pcscdaemon.c:655:main() pcsc-lite 1.8.20 daemon ready. i.e. the line about hotplug_libusb.c:440:HPEstablishUSBNotifications() does not show up; and a truss shows that is is doing/waiting on something on a dev; it is very slow doing some ioctls: openat(AT_FDCWD,"/dev/usbctl",O_RDONLY,00) = 11 (0xb) ioctl(11,USB_READ_DIR,0xdfdfcb38) = 0 (0x0) openat(AT_FDCWD,"/dev/ugen1.1",O_RDWR,00) = 12 (0xc) ioctl(12,USB_GET_PLUGTIME,0xdfdfcb1c) = 0 (0x0) ioctl(12,USB_GET_DEVICE_DESC,0xdfdfcb20) = 0 (0x0) ioctl(12,USB_GET_DEVICEINFO,0xdfdfccb0) = 0 (0x0) -- Matthias Apitz, ✉ guru@unixarea.de, ⌂ http://www.unixarea.de/ ☎ +49-176-38902045
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170511090230.GA26224>