Is there a way to specify which smartcard reader to use?

Alphazo alphazo at gmail.com
Fri Oct 8 11:58:43 CEST 2010


Hello,

I have two USB dongle plugged in at the same time. One is the crypto
stick (OpenPGP card 2.0 + CCID reader) and the other one is a PKCS#11
token. I don't use any udev rule for the crypto stick as the latest ccid
lib supports it out of the box. Now I'm unable to do a gpg --card-status
with both token inserted.

gpg: detected reader `Feitian SCR301 00 00'
gpg: detected reader `German Privacy Foundation Crypto Stick v1.2 01 00'
Insérez la carte et tapez entrée ou entrez 'c' pour annuler:

Is there a way to specify which reader to use for that command?

For information, pcsc_scan reports the two readers correctly:

PC/SC device scanner
V 1.4.17 (c) 2001-2009, Ludovic Rousseau <ludovic.rousseau at free.fr>
<ludovic.rousseau at free.fr>
Compiled with PC/SC lite version: 1.6.4
Scanning present readers...
0: Feitian SCR301 00 00
1: German Privacy Foundation Crypto Stick v1.2 01 00

Fri Oct  8 10:34:55 2010
 Reader 0: Feitian SCR301 00 00
  Card state: Card inserted,
  ATR: 3B 9F 95 81 31 FE 9F 00 65 46 53 05 30 06 71 DF 00 00 00 81 61 10 C6

ATR: 3B 9F 95 81 31 FE 9F 00 65 46 53 05 30 06 71 DF 00 00 00 81 61 10 C6
+ TS = 3B --> Direct Convention
+ T0 = 9F, Y(1): 1001, K: 15 (historical bytes)
  TA(1) = 95 --> Fi=512, Di=16, 32 cycles/ETU
    125000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 156250 bits/s
  TD(1) = 81 --> Y(i+1) = 1000, Protocol T = 1
-----
  TD(2) = 31 --> Y(i+1) = 0011, Protocol T = 1
-----
  TA(3) = FE --> IFSC: 254
  TB(3) = 9F --> Block Waiting Integer: 9 - Character Waiting Integer: 15
+ Historical bytes: 00 65 46 53 05 30 06 71 DF 00 00 00 81 61 10
  Category indicator byte: 00 (compact TLV data object)
    Tag: 6, len: 5 (pre-issuing data)
      Data: 46 53 05 30 06
    Tag: 7, len: 1 (card capabilities)
      Selection methods: DF
        - DF selection by full DF name
        - DF selection by partial DF name
        - DF selection by file identifier
        - Implicit DF selection
        - Short EF identifier supported
        - Record number supported
        - Record identifier supported
    Tag: 0, len: 0 (unknown)
    Tag: 0, len: 0 (unknown)
    Tag: 0, len: 0 (unknown)
    Mandatory status indicator (3 last bytes)
      LCS (life card cycle): 81 (Proprietary)
      SW: 6110 (0x10 bytes of response still available.)
+ TCK = C6 (correct checksum)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B 9F 95 81 31 FE 9F 00 65 46 53 05 30 06 71 DF 00 00 00 81 61 10 C6
3B 9F 95 81 31 FE 9F 00 65 46 53 05 .. 06 71 DF 00 00 00 .. .. .. ..
    Feitian PKI (http://www.ftsafe.com/products/PKI-Card.html)
    FTCOS/PK-01C

Fri Oct  8 10:34:55 2010
 Reader 1: German Privacy Foundation Crypto Stick v1.2 01 00
  Card state: Card inserted,
  ATR: 3B DA 18 FF 81 B1 FE 75 1F 03 00 31 C5 73 C0 01 40 00 90 00 0C

ATR: 3B DA 18 FF 81 B1 FE 75 1F 03 00 31 C5 73 C0 01 40 00 90 00 0C
+ TS = 3B --> Direct Convention
+ T0 = DA, Y(1): 1101, K: 10 (historical bytes)
  TA(1) = 18 --> Fi=372, Di=12, 31 cycles/ETU
    129032 bits/s at 4 MHz, fMax for Fi = 5 MHz => 161290 bits/s
  TC(1) = FF --> Extra guard time: 255 (special value)
  TD(1) = 81 --> Y(i+1) = 1000, Protocol T = 1
-----
  TD(2) = B1 --> Y(i+1) = 1011, Protocol T = 1
-----
  TA(3) = FE --> IFSC: 254
  TB(3) = 75 --> Block Waiting Integer: 7 - Character Waiting Integer: 5
  TD(3) = 1F --> Y(i+1) = 0001, Protocol T = 15 - Global interface bytes
following
-----
  TA(4) = 03 --> Clock stop: not supported - Class accepted by the card:
(3G) A 5V B 3V
+ Historical bytes: 00 31 C5 73 C0 01 40 00 90 00
  Category indicator byte: 00 (compact TLV data object)
    Tag: 3, len: 1 (card service data byte)
      Card service data byte: C5
        - Application selection: by full DF name
        - Application selection: by partial DF name
        - EF.DIR and EF.ATR access services: by GET DATA command
        - Card without MF
    Tag: 7, len: 3 (card capabilities)
      Selection methods: C0
        - DF selection by full DF name
        - DF selection by partial DF name
      Data coding byte: 01
        - Behaviour of write functions: one-time write
        - Value 'FF' for the first byte of BER-TLV tag fields: invalid
        - Data unit in quartets: 2
      Command chaining, length fields and logical channels: 40
        - Extended Lc and Le fields
        - Logical channel number assignment: No logical channel
        - Maximum number of logical channels: 1
    Mandatory status indicator (3 last bytes)
      LCS (life card cycle): 00 (No information given)
      SW: 9000 (Normal processing.)
+ TCK = 0C (correct checksum)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B DA 18 FF 81 B1 FE 75 1F 03 00 31 C5 73 C0 01 40 00 90 00 0C
    GnuPG card V2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20101008/076f3e6f/attachment.htm>


More information about the Gnupg-users mailing list