[Pcsclite-muscle] Reliable reader names

Andreas Schwier andreas.schwier at cardcontact.de
Thu Nov 30 06:54:11 PST 2023



On 30.11.23 15:39, Ludovic Rousseau wrote:
> Le jeu. 30 nov. 2023 à 14:07, Andreas Schwier
> <andreas.schwier at cardcontact.de> a écrit :
>>
>> Hi Ludovic,
> 
> Hello Andreas,
> 
>> is there a configuration option, so that pcscd creates reliable reader
>> names ?
>>
>> Now the reader name contains, in addition to the serial number, a
>> dynamically (?) generated number pair:
>>
>> Identiv uTrust 3512 SAM Token [CCID Interface] (55511639601026) 00 00
>> Identiv uTrust 3512 SAM Token [CCID Interface] (55511639601420) 01 00
>>
>> This makes the configuration of reader names difficult, as the last two
>> numbers keep changing after reboot.
> 
> They are the index and slot numbers.
> See https://blog.apdu.fr/posts/2010/05/what-is-in-pcsc-reader-name/
> 
>> Maybe a good option would be to suppress the two numbers, if the reader
>> reports a serial number.
> 
> Yes, it would be technically possible.
> But I am not sure it is a good idea.
> 
> Maybe you can just ignore them in your code?

But I need to specify the full reader name in SCardConnect(). So putting 
the reader name in a configuration file will not work. I'd rather then 
read the full reader list and perform a partial match to find the reader 
based on the serial number.

Or is there an option to pass only a partial reader name in SCardConnect() ?

We are using that to connect SmartCard-HSMs automatically to cloud 
services during system startup. Ideally we would spawn the connect 
process based on USB activation, but then we would need to bypass pcscd. 
Instead we create systemd units that connect a certain SmartCard-HSM 
with a specified URL. In the systemd unit we specify the reader name.

> 
> Bye
> 

-- 
     ---------    CardContact Systems GmbH
    |.##> <##.|   Schülerweg 38
    |#       #|   D-32429 Minden, Germany
    |#       #|   Phone +49 571 56149
    |'##> <##'|   http://www.cardcontact.de
     ---------    Registergericht Bad Oeynhausen HRB 14880
                  Geschäftsführer Andreas Schwier



More information about the pcsclite-muscle mailing list