[Pcsclite-muscle] ccid: Change order of card readers
Bernhard Walle
bernhard.walle at posteo.eu
Thu Nov 7 06:07:30 PST 2024
Hi, Douglas,
Thanks a lot.
Regards,
Bernhard
Am 07.11.2024 12:23 schrieb Douglas E Engert:
> What you should be dealing with is not the slot numbers, but the
> tokens in the slot.
>
> Have a look at https://www.rfc-editor.org/rfc/rfc7512.html which tries
> address many of the following issues
>
> PKCS11 does not really care about readers but the card in the readers
>
> "CK_SLOT_ID is a Cryptoki-assigned value that identifies a slot." Each
> application gets a
> list of known slots when it calls C_GetSlotList, Note the flags
> CKF_TOKEN_PRESENT and CKF_REMOVABLE_DEVICE
> The list of slots will not change for that application until
> C_GetSlotList is called again. The
> CKF_TOKEN_PRESENT may change if a card is removed or inserted.
>
> If multiple applications call C_GetSlotList the slot numbers may be
> different if readers are are added or removed.
> So you can not depend on the slot number. CKF_REMOVABLE_DEVICE
> distinguishes the difference.
>
> The CK_SLOT_INFO slotDescription and manufacturerID are set by the
> PKCS11 module (in your case Telesec)
> which may or may not include the reader name.
>
> C_GetTokenInfo is more of what you should look at, which serialNumber.
>
> You may also find the OpenSC pkcs11-tool which can use any PKCS11
> module to look at what the
> Telesec pkcs11 module does.
>
> After all of this if your problem is something like trying to have one
> card for an ADMIN trying
> to initialize a new card in another reader, you still need to tell the
> person which reader to insert
> the new card. One way to to have two different types of readers.
> Personally I have found Identiv SCR3500 Smartfold Smart Card Reader to
> be good. Amazon $17.95
>
>
> On 11/7/2024 3:07 AM, Bernhard Walle wrote:
>> Hello,
>>
>> I'm using Linux.
>>
>> Problem is that we don't use pcsc directly but via a PKCS#11
>> middleware (Telesec), so we're not dealing with reader names in PC/SC
>> but with slot numbers in the PKCS#11.
>>
>>
>> Regards,
>> Bernhard
>>
>>
>> Am 07.11.2024 02:52 schrieb Douglas E Engert:
>>> If you have more then one reader, you should be looking for the card
>>> in the reader.
>>> What code is calling PCSC?
>>> What OS?
>>>
>>> On 11/6/2024 8:07 AM, Bernhard Walle wrote:
>>>> Hello,
>>>>
>>>> is is possible to change the order of card readers detected by pcscd
>>>> when using ccid drivers in some configuration file?
>>>>
>>>> I mean, we have two identical readers:
>>>>
>>>> $ pcsc_scan -r
>>>> Using reader plug'n play mechanism
>>>> Scanning present readers...
>>>> 0: HID Global OMNIKEY 3x21 Smart Card Reader [OMNIKEY 3x21 Smart
>>>> Card Reader] 00 00
>>>> 1: HID Global OMNIKEY 3x21 Smart Card Reader [OMNIKEY 3x21 Smart
>>>> Card Reader] 01 00
>>>>
>>>>
>>>> So is it possible to revert the order?
>>>>
>>>>
>>>> Regards,
>>>> Bernhard
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> pcsclite-muscle mailing list
>>>> pcsclite-muscle at lists.infradead.org
>>>> http://lists.infradead.org/mailman/listinfo/pcsclite-muscle
More information about the pcsclite-muscle
mailing list