Hi,
I've recently set up the openct/opensc system on my Linux
system and
tried to deploy it to sth useful. But I came across a
problem. I can
read serial, name and atr from a card, but not any object
stored on the
card. I tried with two starcos cards, both of which work
very well under
windows (using safesign software). Both cards had valid
certificates
(ok, maybe not valid, one expired in 2003, but still, their
structure
was ok) on them. I collected some log, so that you need not
guess what
do I mean. Once the /var/log/messages info and secondly I
attached -vv
to each cmd.
Now, the most important question for me is, is it the fault
of the
reader driver (2.6.22 built-in module cm4000_cs + openct) or
the card
driver (opensc)? I run x86_64, for which pcsc-lite drivers
for cardman
4000 are not available, so there isn't really an option of
trying
something else (besides maybe, trying x86 instead of amd64,
but I'd like
to try other possibilities first). The hardware is ok, which
windows has
proven.
I'd be very grateful for any information.
Thanks in advance,
Adam
Here follow the logs:
adam laptop-awi ~ $ opensc-tool --serial -vv
[opensc-tool] sc.c:196:sc_detect_card_presence: called
[opensc-tool]
reader-openct.c:204:openct_reader_detect_card_presence:
called
[opensc-tool] sc.c:201:sc_detect_card_presence: returning
with: 1
Connecting to card in reader OMNIKEY CardMan 4000...
[opensc-tool] card.c:110:sc_connect_card: called
[opensc-tool] reader-openct.c:228:openct_reader_connect:
called
[opensc-tool] reader-openct.c:420:openct_reader_lock:
called
[opensc-tool] reader-openct.c:445:openct_reader_unlock:
called
[opensc-tool] card.c:221:sc_connect_card: card info: STARCOS
SPK 2.3,
7001, 0x0
[opensc-tool] card.c:222:sc_connect_card: returning with: 0
Using card driver STARCOS SPK 2.3/2.4.
[opensc-tool] reader-openct.c:420:openct_reader_lock:
called
Card serial number:22 90 14 46 00 06 29 0C "..F..).
[opensc-tool] reader-openct.c:445:openct_reader_unlock:
called
[opensc-tool] card.c:236:sc_disconnect_card: called
[opensc-tool] reader-openct.c:275:openct_reader_disconnect:
called
[opensc-tool] card.c:251:sc_disconnect_card: returning with:
0
[opensc-tool] ctx.c:738:sc_release_context: called
[opensc-tool] reader-openct.c:178:openct_reader_release:
called
[opensc-tool] reader-openct.c:164:openct_reader_finish:
called
adam laptop-awi ~ $ opensc-tool -nvv
[opensc-tool] sc.c:196:sc_detect_card_presence: called
[opensc-tool]
reader-openct.c:204:openct_reader_detect_card_presence:
called
[opensc-tool] sc.c:201:sc_detect_card_presence: returning
with: 1
Connecting to card in reader OMNIKEY CardMan 4000...
[opensc-tool] card.c:110:sc_connect_card: called
[opensc-tool] reader-openct.c:228:openct_reader_connect:
called
[opensc-tool] reader-openct.c:420:openct_reader_lock:
called
[opensc-tool] reader-openct.c:445:openct_reader_unlock:
called
[opensc-tool] card.c:221:sc_connect_card: card info: STARCOS
SPK 2.3,
7001, 0x0
[opensc-tool] card.c:222:sc_connect_card: returning with: 0
Using card driver STARCOS SPK 2.3/2.4.
[opensc-tool] reader-openct.c:420:openct_reader_lock:
called
Card name: STARCOS SPK 2.3
[opensc-tool] reader-openct.c:445:openct_reader_unlock:
called
[opensc-tool] card.c:236:sc_disconnect_card: called
[opensc-tool] reader-openct.c:275:openct_reader_disconnect:
called
[opensc-tool] card.c:251:sc_disconnect_card: returning with:
0
[opensc-tool] ctx.c:738:sc_release_context: called
[opensc-tool] reader-openct.c:178:openct_reader_release:
called
[opensc-tool] reader-openct.c:164:openct_reader_finish:
called
adam laptop-awi ~ $ opensc-tool -avv
[opensc-tool] sc.c:196:sc_detect_card_presence: called
[opensc-tool]
reader-openct.c:204:openct_reader_detect_card_presence:
called
[opensc-tool] sc.c:201:sc_detect_card_presence: returning
with: 1
Connecting to card in reader OMNIKEY CardMan 4000...
[opensc-tool] card.c:110:sc_connect_card: called
[opensc-tool] reader-openct.c:228:openct_reader_connect:
called
[opensc-tool] reader-openct.c:420:openct_reader_lock:
called
[opensc-tool] reader-openct.c:445:openct_reader_unlock:
called
[opensc-tool] card.c:221:sc_connect_card: card info: STARCOS
SPK 2.3,
7001, 0x0
[opensc-tool] card.c:222:sc_connect_card: returning with: 0
Using card driver STARCOS SPK 2.3/2.4.
[opensc-tool] reader-openct.c:420:openct_reader_lock:
called
Card ATR:
3B B7 94 00 81 31 FE 65 53 50 4B 32 33 90 00 D1
;....1.eSPK23...
[opensc-tool] reader-openct.c:445:openct_reader_unlock:
called
[opensc-tool] card.c:236:sc_disconnect_card: called
[opensc-tool] reader-openct.c:275:openct_reader_disconnect:
called
[opensc-tool] card.c:251:sc_disconnect_card: returning with:
0
[opensc-tool] ctx.c:738:sc_release_context: called
[opensc-tool] reader-openct.c:178:openct_reader_release:
called
[opensc-tool] reader-openct.c:164:openct_reader_finish:
called
while doint serial, the log says:
Jan 7 20:14:44 laptop-awi ifdhandler[5649]: cm_card_status:
called.
Jan 7 20:14:44 laptop-awi ifdhandler[5649]: cm_card_status:
card present
Jan 7 20:14:44 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_LOCK, unit=0)
Jan 7 20:14:44 laptop-awi ifdhandler[5649]:
ifdhandler_lock: granted
excl lock 13 for slot 0 by uid=1000
Jan 7 20:14:44 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_TRANSACT, unit=0)
Jan 7 20:14:44 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
cmd: 00 ca df 30 05
Jan 7 20:14:44 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
resp: 6a 88
Jan 7 20:14:44 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_UNLOCK, unit=0)
Jan 7 20:14:44 laptop-awi ifdhandler[5649]:
ifdhandler_unlock: released
excl lock 13 for slot 0 by uid=1000
Jan 7 20:14:44 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_LOCK, unit=0)
Jan 7 20:14:44 laptop-awi ifdhandler[5649]:
ifdhandler_lock: granted
excl lock 14 for slot 0 by uid=1000
Jan 7 20:14:44 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_UNLOCK, unit=0)
Jan 7 20:14:44 laptop-awi ifdhandler[5649]:
ifdhandler_unlock: released
excl lock 14 for slot 0 by uid=1000
and now how to break it:
adam laptop-awi ~ $ pkcs15-tool -vvc
[pkcs15-tool] sc.c:196:sc_detect_card_presence: called
[pkcs15-tool]
reader-openct.c:204:openct_reader_detect_card_presence:
called
[pkcs15-tool] sc.c:201:sc_detect_card_presence: returning
with: 1
Connecting to card in reader OMNIKEY CardMan 4000...
[pkcs15-tool] card.c:110:sc_connect_card: called
[pkcs15-tool] reader-openct.c:228:openct_reader_connect:
called
[pkcs15-tool] reader-openct.c:420:openct_reader_lock:
called
[pkcs15-tool] reader-openct.c:445:openct_reader_unlock:
called
[pkcs15-tool] card.c:221:sc_connect_card: card info: STARCOS
SPK 2.3,
7001, 0x0
[pkcs15-tool] card.c:222:sc_connect_card: returning with: 0
Using card driver STARCOS SPK 2.3/2.4.
[pkcs15-tool] reader-openct.c:420:openct_reader_lock:
called
Trying to find a PKCS#15 compatible card...
[pkcs15-tool] pkcs15.c:706:sc_pkcs15_bind: called
[pkcs15-tool] card.c:532:sc_select_file: called; type=2,
path=3f002f00
[pkcs15-tool] card-starcos.c:367:starcos_select_file:
called
[pkcs15-tool] iso7816.c:99:iso7816_check_sw: File not found
[pkcs15-tool] card.c:554:sc_select_file: returning with:
-1201
[pkcs15-tool] card.c:532:sc_select_file: called; type=2,
path=3f005015
[pkcs15-tool] card-starcos.c:367:starcos_select_file:
called
[pkcs15-tool] card.c:554:sc_select_file: returning with: 0
[pkcs15-tool] card.c:532:sc_select_file: called; type=2,
path=3f0050155031
[pkcs15-tool] card-starcos.c:367:starcos_select_file:
called
[pkcs15-tool] card.c:554:sc_select_file: returning with: 0
and the log says:
Jan 7 20:16:24 laptop-awi ifdhandler[5649]: cm_card_status:
called.
Jan 7 20:16:24 laptop-awi ifdhandler[5649]: cm_card_status:
card present
Jan 7 20:16:24 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_RESET, unit=0)
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_select: atr=
3b b7 94 00 81 31 fe 65 53 50 4b 32 33 90 00 d1
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_select:
default T=1, supported protocols=0x2
Jan 7 20:16:26 laptop-awi ifdhandler[5649]: cm_card_status:
called.
Jan 7 20:16:26 laptop-awi ifdhandler[5649]: cm_card_status:
card present
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_LOCK, unit=0)
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_lock: granted
excl lock 15 for slot 0 by uid=1000
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_TRANSACT, unit=0)
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
cmd: 00 ca df 30 05
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
resp: 6a 88
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_UNLOCK, unit=0)
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_unlock: released
excl lock 15 for slot 0 by uid=1000
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_LOCK, unit=0)
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_lock: granted
excl lock 16 for slot 0 by uid=1000
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_TRANSACT, unit=0)
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
cmd: 00 a4 00 00 02 3f 00 00
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
resp: 62 84
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_TRANSACT, unit=0)
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
cmd: 00 a4 00 0c 02 3f 00
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
resp: 90 00
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_TRANSACT, unit=0)
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
cmd: 00 a4 00 00 02 2f 00 00
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
resp: 6a 82
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_TRANSACT, unit=0)
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
cmd: 00 a4 00 00 02 50 15 00
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
resp: 62 84
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_TRANSACT, unit=0)
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
cmd: 00 a4 00 0c 02 50 15
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
resp: 90 00
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_TRANSACT, unit=0)
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
cmd: 00 a4 00 00 02 50 31 00
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
resp: 6f 07 80 02 00 30 82 01 01 90 00
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_TRANSACT, unit=0)
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
cmd: 00 b0 00 00 01
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
resp: a0 90 00
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifdhandler_process:
ifdhandler_process(cmd=CT_CMD_TRANSACT, unit=0)
Jan 7 20:16:26 laptop-awi ifdhandler[5649]:
ifd_protocol_transceive:
cmd: 00 b0 00 00 30
Jan 7 20:16:26 laptop-awi ifdhandler[5649]: t1_transceive:
checksum failed
Jan 7 20:16:26 laptop-awi ifdhandler[5649]: t1_transceive:
checksum failed
Jan 7 20:16:26 laptop-awi ifdhandler[5649]: t1_transceive:
checksum failed
Jan 7 20:16:26 laptop-awi ifdhandler[5649]: t1_transceive:
checksum failed
and this way until I remove the card.
_______________________________________________
opensc-user mailing list
opensc-user lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-
user
|