this problem has bothered me for many days, and after I have searched
google  with great efforts then asked some people, I still can't solve it,
so I ask you here.

the problem is I can't using "pkcs15-init -C" to initialize my etoken.

my etoken is Aladdin etoken Pro 64K and I'm using debian 6.0 wheezy, opensc
is compiled from svn repository(also have used released version before)

before I try to use opensc, I have already initialized etoken with safenet
authentication client tools from Aladdin, I've read the FAQ on the opensc
website, but I don't know after reinitialize etoken with SAC, is there free
space for opensc? and how should I initialize my etoken so that I can use
it in opensc?

I have both used pcscd and openct, and now I'm using openct.


here is some information:

#opensc-tool -l
# Detected readers (openct)
Nr.  Card  Features  Name
0    Yes             Aladdin eToken PRO 64k
1    No              OpenCT reader (detached)

#opensc-tool -ian
opensc 0.12.2 [gcc  4.6.2]
Enabled features: zlib openssl openct
Using reader with a card: Aladdin eToken PRO 64k
3b:f2:18:00:ff:c1:0a:31:fe:55:c8:06:8a
CardOS M

#cardos-tool -i
Using reader with a card: Aladdin eToken PRO 64k
3b:f2:18:00:ff:c1:0a:31:fe:55:c8:06:8a
Info : CardOS V4.2 (C) Siemens AG 1994-2003
Chip type: 124
Serial number: 25 c5 37 17 2e 06
Full prom dump:
33 66 00 09 61 61 61 61 7C FF 25 C5 37 17 2E 06 3f..aaaa|.%.7...
00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
OS Version: 200.6 (that's CardOS M4.2)
Current life cycle: 32 (administration)
Security Status of current DF:
Free memory : 1024
ATR Status: 0x0 ROM-ATR
Packages installed:
E1 09 01 04 1C 01 C8 06 8F 01 01 E1 09 01 04 13 ................
02 C8 06 8F 01 01                               ......
Ram size: 4, Eeprom size: 64, cpu type: 66, chip config: 63
Free eeprom memory: 42556
System keys: PackageLoadKey (version 0x00, retries 10)
System keys: StartKey (version 0xff, retries 10)
Path to current DF:

#pkcs15-init -E
Using reader with a card: Aladdin eToken PRO 64k

#pkcs15-init -C
Using reader with a card: Aladdin eToken PRO 64k
Failed to read PIN: Not supported
Failed to create PKCS #15 meta structure: Generic PKCS#15 initialization
error


here is the opensc debug log level 9:

0xb74376c0 23:55:29.411 [pkcs15-init] ctx.c:659:sc_context_create:
===================================
0xb74376c0 23:55:29.411 [pkcs15-init] ctx.c:660:sc_context_create: opensc
version: 0.12.2
0xb74376c0 23:55:29.411 [pkcs15-init]
reader-openct.c:72:openct_reader_init: called
0xb74376c0 23:55:29.411 [pkcs15-init] sc.c:195:sc_detect_card_presence:
called
0xb74376c0 23:55:29.411 [pkcs15-init]
reader-openct.c:173:openct_reader_detect_card_presence: called
0xb74376c0 23:55:29.411 [pkcs15-init] sc.c:200:sc_detect_card_presence:
returning with: 1
Using reader with a card: Aladdin eToken PRO 64k
0xb74376c0 23:55:29.411 [pkcs15-init] sc.c:195:sc_detect_card_presence:
called
0xb74376c0 23:55:29.411 [pkcs15-init]
reader-openct.c:173:openct_reader_detect_card_presence: called
0xb74376c0 23:55:29.411 [pkcs15-init] sc.c:200:sc_detect_card_presence:
returning with: 1
0xb74376c0 23:55:29.411 [pkcs15-init] card.c:115:sc_connect_card: called
0xb74376c0 23:55:29.411 [pkcs15-init]
reader-openct.c:196:openct_reader_connect: called
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:136:sc_connect_card: matching
configured ATRs
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:175:sc_connect_card: matching
built-in ATRs
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:180:sc_connect_card: trying
driver: cardos
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:829:match_atr_table: ATR     :
3b:f2:18:00:ff:c1:0a:31:fe:55:c8:06:8a
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:840:match_atr_table: ATR try :
3b:e2:00:ff:c1:10:31:fe:55:c8:02:9c
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:843:match_atr_table: ignored -
wrong length
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:840:match_atr_table: ATR try :
3b:e9:00:ff:c1:10:31:fe:55:00:64:05:00:c8:02:31:80:00:47
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:843:match_atr_table: ignored -
wrong length
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:840:match_atr_table: ATR try :
3b:fb:98:00:ff:c1:10:31:fe:55:00:64:05:20:47:03:31:80:00:90:00:f3
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:843:match_atr_table: ignored -
wrong length
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:840:match_atr_table: ATR try :
3b:fc:98:00:ff:c1:10:31:fe:55:c8:03:49:6e:66:6f:63:61:6d:65:72:65:28
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:843:match_atr_table: ignored -
wrong length
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:840:match_atr_table: ATR try :
3b:f4:98:00:ff:c1:10:31:fe:55:4d:34:63:76:b4
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:843:match_atr_table: ignored -
wrong length
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:840:match_atr_table: ATR try :
3b:f2:18:00:ff:c1:0a:31:fe:55:c8:06:8a
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:847:match_atr_table: ATR mask:
ff:ff:0f:ff:00:ff:00:ff:ff:00:00:00:00
0xb74376c0 23:55:29.462 [pkcs15-init] card-cardos.c:87:cardos_match_card:
checking cardos version ...
0xb74376c0 23:55:29.462 [pkcs15-init] apdu.c:525:sc_transmit_apdu: called
0xb74376c0 23:55:29.462 [pkcs15-init] card.c:292:sc_lock: called
0xb74376c0 23:55:29.462 [pkcs15-init]
reader-openct.c:381:openct_reader_lock: called
0xb74376c0 23:55:29.462 [pkcs15-init] apdu.c:184:sc_apdu_log:
Outgoing APDU data [    5 bytes] =====================================
00 CA 01 82 00 .....
======================================================================
0xb74376c0 23:55:29.475 [pkcs15-init] apdu.c:184:sc_apdu_log:
Incoming APDU data [    4 bytes] =====================================
C8 06 90 00 ....
======================================================================
0xb74376c0 23:55:29.475 [pkcs15-init] card.c:330:sc_unlock: called
0xb74376c0 23:55:29.475 [pkcs15-init]
reader-openct.c:407:openct_reader_unlock: called
0xb74376c0 23:55:29.475 [pkcs15-init] card-cardos.c:114:cardos_match_card:
found cardos m4.2
0xb74376c0 23:55:29.475 [pkcs15-init] card.c:187:sc_connect_card: matched:
Siemens CardOS
0xb74376c0 23:55:29.475 [pkcs15-init] apdu.c:525:sc_transmit_apdu: called
0xb74376c0 23:55:29.475 [pkcs15-init] card.c:292:sc_lock: called
0xb74376c0 23:55:29.475 [pkcs15-init]
reader-openct.c:381:openct_reader_lock: called
0xb74376c0 23:55:29.475 [pkcs15-init] apdu.c:184:sc_apdu_log:
Outgoing APDU data [    5 bytes] =====================================
00 CA 01 88 00 .....
======================================================================
0xb74376c0 23:55:29.496 [pkcs15-init] apdu.c:184:sc_apdu_log:
Incoming APDU data [   24 bytes] =====================================
E1 09 01 04 1C 01 C8 06 8F 01 01 E1 09 01 04 13 ................
02 C8 06 8F 01 01 90 00                         ........
======================================================================
0xb74376c0 23:55:29.496 [pkcs15-init] card.c:330:sc_unlock: called
0xb74376c0 23:55:29.496 [pkcs15-init]
reader-openct.c:407:openct_reader_unlock: called
0xb74376c0 23:55:29.496 [pkcs15-init] card.c:224:sc_connect_card: card info
name:'CardOS M4', type:1003, flags:0x0, max_send/recv_size:0/0
0xb74376c0 23:55:29.496 [pkcs15-init] card.c:225:sc_connect_card: returning
with: 0 (Success)
0xb74376c0 23:55:29.496 [pkcs15-init] card.c:292:sc_lock: called
0xb74376c0 23:55:29.496 [pkcs15-init]
reader-openct.c:381:openct_reader_lock: called
0xb74376c0 23:55:29.496 [pkcs15-init] pkcs15-lib.c:296:sc_pkcs15init_bind:
called
0xb74376c0 23:55:29.496 [pkcs15-init] card.c:720:sc_card_ctl: called
0xb74376c0 23:55:29.496 [pkcs15-init]
card-cardos.c:930:cardos_lifecycle_set: called
0xb74376c0 23:55:29.496 [pkcs15-init]
card-cardos.c:884:cardos_lifecycle_get: called
0xb74376c0 23:55:29.496 [pkcs15-init] apdu.c:525:sc_transmit_apdu: called
0xb74376c0 23:55:29.496 [pkcs15-init] card.c:292:sc_lock: called
0xb74376c0 23:55:29.496 [pkcs15-init] apdu.c:184:sc_apdu_log:
Outgoing APDU data [    5 bytes] =====================================
00 CA 01 83 00 .....
======================================================================
0xb74376c0 23:55:29.509 [pkcs15-init] apdu.c:184:sc_apdu_log:
Incoming APDU data [    3 bytes] =====================================
20 90 00  ..
======================================================================
0xb74376c0 23:55:29.509 [pkcs15-init] card.c:330:sc_unlock: called
0xb74376c0 23:55:29.509 [pkcs15-init]
card-cardos.c:918:cardos_lifecycle_get: returning with: 0 (Success)
0xb74376c0 23:55:29.509 [pkcs15-init] card.c:730:sc_card_ctl: returning
with: 0 (Success)
0xb74376c0 23:55:29.509 [pkcs15-init] card.c:571:sc_select_file: called;
type=2, path=3f0050154946
0xb74376c0 23:55:29.509 [pkcs15-init] card-cardos.c:439:cardos_select_file:
called
0xb74376c0 23:55:29.509 [pkcs15-init] apdu.c:525:sc_transmit_apdu: called
0xb74376c0 23:55:29.509 [pkcs15-init] card.c:292:sc_lock: called
0xb74376c0 23:55:29.509 [pkcs15-init] apdu.c:184:sc_apdu_log:
Outgoing APDU data [   10 bytes] =====================================
00 A4 08 00 04 50 15 49 46 00 .....P.IF.
======================================================================
0xb74376c0 23:55:29.536 [pkcs15-init] apdu.c:184:sc_apdu_log:
Incoming APDU data [    2 bytes] =====================================
6A 82 j.
======================================================================
0xb74376c0 23:55:29.536 [pkcs15-init] card.c:330:sc_unlock: called
0xb74376c0 23:55:29.536 [pkcs15-init] card-cardos.c:268:cardos_check_sw:
file not found
0xb74376c0 23:55:29.536 [pkcs15-init] iso7816.c:485:iso7816_select_file:
returning with: -1201 (File not found)
0xb74376c0 23:55:29.536 [pkcs15-init] card-cardos.c:443:cardos_select_file:
returning with: -1201 (File not found)
0xb74376c0 23:55:29.536 [pkcs15-init] card.c:597:sc_select_file: returning
with: -1201 (File not found)
0xb74376c0 23:55:29.536 [pkcs15-init] profile.c:327:sc_profile_load: called
0xb74376c0 23:55:29.536 [pkcs15-init] profile.c:357:sc_profile_load: Using
profile directory '/usr/local/share/opensc'.
0xb74376c0 23:55:29.536 [pkcs15-init] profile.c:365:sc_profile_load: Trying
profile file /usr/local/share/opensc/pkcs15.profile
0xb74376c0 23:55:29.536 [pkcs15-init] profile.c:370:sc_profile_load:
profile /usr/local/share/opensc/pkcs15.profile loaded ok
0xb74376c0 23:55:29.536 [pkcs15-init] profile.c:380:sc_profile_load:
returning with: 0 (Success)
0xb74376c0 23:55:29.536 [pkcs15-init] profile.c:327:sc_profile_load: called
0xb74376c0 23:55:29.537 [pkcs15-init] profile.c:357:sc_profile_load: Using
profile directory '/usr/local/share/opensc'.
0xb74376c0 23:55:29.537 [pkcs15-init] profile.c:365:sc_profile_load: Trying
profile file /usr/local/share/opensc/cardos.profile
0xb74376c0 23:55:29.537 [pkcs15-init] profile.c:370:sc_profile_load:
profile /usr/local/share/opensc/cardos.profile loaded ok
0xb74376c0 23:55:29.537 [pkcs15-init] profile.c:380:sc_profile_load:
returning with: 0 (Success)
0xb74376c0 23:55:29.537 [pkcs15-init] profile.c:392:sc_profile_finish:
called
0xb74376c0 23:55:29.537 [pkcs15-init] profile.c:435:sc_profile_finish:
returning with: 0 (Success)
0xb74376c0 23:55:29.537 [pkcs15-init] pkcs15-lib.c:378:sc_pkcs15init_bind:
returning with: 0 (Success)
Failed to read PIN: Not supported
Failed to create PKCS #15 meta structure: Generic PKCS#15 initialization
error
0xb74376c0 23:55:29.537 [pkcs15-init] card.c:330:sc_unlock: called
0xb74376c0 23:55:29.537 [pkcs15-init]
reader-openct.c:407:openct_reader_unlock: called
0xb74376c0 23:55:29.537 [pkcs15-init] card.c:242:sc_disconnect_card: called
0xb74376c0 23:55:29.537 [pkcs15-init]
reader-openct.c:242:openct_reader_disconnect: called
0xb74376c0 23:55:29.537 [pkcs15-init] card.c:258:sc_disconnect_card:
returning with: 0 (Success)
0xb74376c0 23:55:29.537 [pkcs15-init] ctx.c:737:sc_release_context: called
0xb74376c0 23:55:29.537 [pkcs15-init]
reader-openct.c:153:openct_reader_release: called
0xb74376c0 23:55:29.537 [pkcs15-init]
reader-openct.c:153:openct_reader_release: called
0xb74376c0 23:55:29.537 [pkcs15-init]
reader-openct.c:140:openct_reader_finish: called
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to