Score:0

ubuntu22.04 pkcs11-tool --module /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so -L gemalto gemplus token not recognized

gb flag

I'm trying to present a virtual smartcard to a ubuntu virtual machine. But the smartcard isn't recognized by the vm. Although an Almalinux 9 vm does recognize the virtual smartcard.

I'm using libvirt's smartcard module as described here Smartcard Devices. When I boot up a ubuntu 22.04 vm and run the command pkcs11-tool --module /usr/lib/x86_64-linux-gnu/opensc-pkcs11.so -L I get the error

Slot 0 (0x0): Gemalto Gemplus USB SmartCard Reader 433-Swap [CCID interface...  
  (token not recognized)

--edit
It seems like the problem lies with the libccid library packaged with ubuntu 22.04 (libccid version 1.5.0-2). I compiled version 1.4.34 and replaced the libccid.so with my compiled version and then everything worked. I don't know if there's a code regression in libccid, or if it was compiled wrong, or if it's just incompatible.

example output of the same command, but with the self compiled version of libccid.

Available slots:  
Slot 0 (0x0): Gemalto Gemplus USB SmartCard Reader 433-Swap [CCID Interface...
  token label        : cert1
  token manufacturer : Common Access Card
  token model        : PKCS#15 emulated
  token flags        : login required, PIN pad present, rng, token initialized, PIN initialized
  hardware version   : 0.0
  firmware version   : 0.0
  serial num         : 22ef84d3518c711b
  pin min/max        : 4/8
guiverc avatar
cn flag
I assume you've checked for differences in the VM setup, so why not contrast differences between the GNU/Linux that works (ie. Alma Linux 9) & Ubuntu 22.04 LTS (*server or desktop; you didn't say*). As I (*possibly others on this site too*) know nothing about Alma Linux, it's where I'd look for clues (*if I can get anything to work on one GNU/Linux system, I'm convinced I can get it working on others if I want/need to*)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.