Thank you very much for your kind answers. 2010/1/27 Andreas Jellinghaus <a...@dungeon.inka.de>
Hi Fernando, > > it is best to check the command line utilities like > "pkcs11-tool --test --login" to see if these is a general > problem. if there is not, you could use pkcs#11 spy > (pkcs11-spy.dll) and hook it between your application > and opensc-pkcs11.dll. it will generate a log file of > all your function calls and the return values, and thus > help to debug the problem. > > I've tried to invoke the "pkcs11-tool --test --login" but it has showed: error: PKCS11 function C_OpenSession failed: rv = CKR_TOKEN_NOT_PRESENT (0xe0) Aborting. I've configured the debug=9 in other to get more information. You can find the log attached to this mail "pkcs11_test_login.txt". > > My problems begin when I try to invoke the function C_GetSlotList of the > > opensc-pcks11.dll library. I'm not able to find a slot with information. > > All the slot available seem to be empty. The code I'm trying to execute > > can be find below: > > pkcs11-tool should show some slots. if it does, the problem is most likely > in your application. if it does not, something is wrong with opensc or > its configuration. > > pkcs11-tool -L show me the slots but they are always empty. I've used my application with the manufacturer libraries and it works appropriately. So I think my problem could be related to my opensc configuration. I didn't modify the opensc.conf file because i'm using a usual card supported by opensc, Do I have to modify it? > > ##error2text is a function I use to show the error more friendly. > > pkcs11-spy.dll is the best way to generate log files - no need for you > to show your code or add debugging / print functions, and it generates > a format well known to us and thus easy to understand. > > > Should I configure the type of smart card I'm using in the code? I mean, > is > > there a instruction I have to invoke to indicate i'm using a starcos > smart > > card? > > no. if it is a usual card, opensc will automatically detect it. and if it > is > not a card supported by opensc, you are out of luck anyway. > > but there is the remote chance, that you have a new starcos card that works > with opensc, but has a different ATR than normal. show us "opensc-tool -a" > ... > in such a case you can edit opensc.conf to assign that atr to the starcos > driver. but usualy that is not needed, and the problem is somewhere else. > > Opensc-tool -a show the next information about my ATR: 3b:b7:94:00:81:31:fe:65:53:50:4b:32:33:90:00:d1 I think it is the common ATR for starcos 2.3, besides I've found this ATR code in the sources of opensc project into /libopensc/card-starcos.c. > > I cannot offer more information about my problem since my program doesn't > > have runtime errors or compiled errors, can I? > > opensc-tool -a will show us the atr. > pkcs11-tool --test --login will show us if the card works with opensc in > general. > pkcs11-spy.dll will create a log file, so you and we can see the function > calls and return values. > When I link the pkcs11-spy into my example program i get the next message: General error. I'm afraid it is not very helpful. > one of those might help to debug the problem. > > also you can edit opensc.conf and set debug to 6 and create an opensc > debug log file with details. but lets try the other options first. > > Regards, Andreas > p.s. I'm no starcos expert, so post your new information on the list, as > most likely someone else need to look at it to understand your problem. > Could someone give me any information? I'm running out of ideas. Many Thanks again to everybody. Regards.
=================================== opensc version: 0.11.12 [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called 0: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0 0: Card absent 0: smart card removed 1: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0 1: Card absent 1: smart card removed 2: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0 2: Card absent 2: smart card removed 3: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0 3: Card absent 3: smart card removed 4: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 1 4: Connecting to smart card [opensc-pkcs11] card.c:110:sc_connect_card: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called After connect protocol = 2 ATR : 3b:b7:94:00:81:31:fe:65:53:50:4b:32:33:90:00:d1 ATR try : 3b:6e:00:ff:45:73:74:45:49:44:20:76:65:72:20:31:2e:30 ignored - wrong length ATR try : 3b:fe:94:00:ff:80:b1:fa:45:1f:03:45:73:74:45:49:44:20:76:65:72:20:31:2e:30:43 ignored - wrong length ATR try : 3b:ff:94:00:ff:80:b1:fe:45:1f:03:00:68:d2:76:00:00:28:ff:05:1e:31:80:00:90:00:23 ignored - wrong length ATR try : 3b:ff:11:00:ff:80:b1:fe:45:1f:03:00:68:d2:76:00:00:28:ff:05:1e:31:80:00:90:00:a6 ignored - wrong length Requesting reader features ... SCardControl failed 1 card info: STARCOS SPK 2.3, -1, 0x0 [opensc-pkcs11] card.c:222:sc_connect_card: returning with: 0 4: Detecting Framework [opensc-pkcs11] pkcs15.c:706:sc_pkcs15_bind: called [opensc-pkcs11] card.c:285:sc_lock: called [opensc-pkcs11] reader-pcsc.c:637:pcsc_lock: called trying normal pkcs15 processing called; type=2, path=3f002f00 [opensc-pkcs11] card-starcos.c:367:starcos_select_file: called current path (path, valid): (len: 0) [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 8 bytes] ===================================== 00 A4 00 00 02 3F 00 00 .....?.. ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 2 bytes] ===================================== 62 84 b. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 7 bytes] ===================================== 00 A4 00 0C 02 3F 00 .....?. ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 2 bytes] ===================================== 90 00 .. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] card-starcos.c:356:starcos_select_fid: returning with: 0 [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 8 bytes] ===================================== 00 A4 00 00 02 2F 00 00 ...../.. ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 11 bytes] ===================================== 6F 07 80 02 00 80 82 01 01 90 00 o.......... ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 5 bytes] ===================================== 00 B0 00 00 01 ..... ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 3 bytes] ===================================== 61 90 00 a.. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called processing FCI bytes bytes in file: 128 type: working EF EF structure: transparent [opensc-pkcs11] card-starcos.c:356:starcos_select_fid: returning with: 0 [opensc-pkcs11] card.c:554:sc_select_file: returning with: 0 called; 128 bytes at index 0 [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 5 bytes] ===================================== 00 B0 00 00 80 ..... ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 130 bytes] ===================================== 61 21 4F 0C A0 00 00 00 63 50 4B 43 53 2D 31 35 a!O.....cPKCS-15 50 0B 4F 70 65 6E 53 43 20 43 61 72 64 51 04 3F P.OpenSC CardQ.? 00 50 15 00 00 00 00 00 00 00 00 00 00 00 00 00 .P.............. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 90 00 .. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] iso7816.c:132:iso7816_read_binary: returning with: 128 [opensc-pkcs11] card.c:430:sc_read_binary: returning with: 128 called, left=128, depth 0 Looking for 'dirRecord', tag 0x11000001 decoding 'dirRecord' called, left=33, depth 1 Looking for 'aid', tag 0x1000000f decoding 'aid' Looking for 'label', tag 0x10000010, OPTIONAL decoding 'label' Looking for 'path', tag 0x10000011, OPTIONAL decoding 'path' Looking for 'ddo', tag 0x11000013, OPTIONAL not present [opensc-pkcs11] asn1.c:1202:asn1_decode: returning with: 0 [opensc-pkcs11] asn1.c:1202:asn1_decode: returning with: 0 called, left=93, depth 0 called; type=2, path=3f005015 [opensc-pkcs11] card-starcos.c:367:starcos_select_file: called current path (path, valid): 3f00 (len: 2) [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 8 bytes] ===================================== 00 A4 00 00 02 50 15 00 .....P.. ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 2 bytes] ===================================== 62 84 b. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 7 bytes] ===================================== 00 A4 00 0C 02 50 15 .....P. ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 2 bytes] ===================================== 90 00 .. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] card-starcos.c:356:starcos_select_fid: returning with: 0 [opensc-pkcs11] card.c:554:sc_select_file: returning with: 0 called; type=2, path=3f0050155031 [opensc-pkcs11] card-starcos.c:367:starcos_select_file: called current path (path, valid): 3f005015 (len: 4) [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 8 bytes] ===================================== 00 A4 00 00 02 50 31 00 .....P1. ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 11 bytes] ===================================== 6F 07 80 02 01 00 82 01 01 90 00 o.......... ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 5 bytes] ===================================== 00 B0 00 00 01 ..... ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 3 bytes] ===================================== A8 90 00 ... ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called processing FCI bytes bytes in file: 256 type: working EF EF structure: transparent [opensc-pkcs11] card-starcos.c:356:starcos_select_fid: returning with: 0 [opensc-pkcs11] card.c:554:sc_select_file: returning with: 0 called; 256 bytes at index 0 [opensc-pkcs11] card.c:285:sc_lock: called called; 128 bytes at index 0 [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 5 bytes] ===================================== 00 B0 00 00 80 ..... ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 130 bytes] ===================================== A8 0A 30 08 04 06 3F 00 50 15 44 01 FF FF FF FF ..0...?.P.D..... FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 90 00 .. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] iso7816.c:132:iso7816_read_binary: returning with: 128 [opensc-pkcs11] card.c:430:sc_read_binary: returning with: 128 called; 128 bytes at index 128 [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 5 bytes] ===================================== 00 B0 00 80 80 ..... ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 130 bytes] ===================================== FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 90 00 .. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] iso7816.c:132:iso7816_read_binary: returning with: 128 [opensc-pkcs11] card.c:430:sc_read_binary: returning with: 128 [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] card.c:427:sc_read_binary: returning with: 256 called, left=256, depth 0, choice Looking for 'privateKeys', tag 0x21000000, CHOICE not present Looking for 'publicKeys', tag 0x21000001, CHOICE not present Looking for 'trustedPublicKeys', tag 0x21000002, CHOICE not present Looking for 'secretKeys', tag 0x21000003, CHOICE not present Looking for 'certificates', tag 0x21000004, CHOICE not present Looking for 'trustedCertificates', tag 0x21000005, CHOICE not present Looking for 'usefulCertificates', tag 0x21000006, CHOICE not present Looking for 'dataObjects', tag 0x21000007, CHOICE not present Looking for 'authObjects', tag 0x21000008, CHOICE decoding 'authObjects' called, left=10, depth 1 Looking for 'path', tag 0x1000010 decoding 'path' called, left=8, depth 2 Looking for 'path', tag 0x4 decoding 'path' Looking for 'index', tag 0x2, OPTIONAL not present Looking for 'length', tag 0x20000000, OPTIONAL not present [opensc-pkcs11] asn1.c:1202:asn1_decode: returning with: 0 [opensc-pkcs11] asn1.c:1202:asn1_decode: returning with: 0 [opensc-pkcs11] asn1.c:1201:asn1_decode: returning with: 8 called, left=244, depth 0, choice The following DFs were found: DF type 8, path 3f0050154401, index 0, count -1 called; type=2, path=3f0050155032 [opensc-pkcs11] card-starcos.c:367:starcos_select_file: called current path (path, valid): 3f005015 (len: 4) [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 8 bytes] ===================================== 00 A4 00 00 02 50 32 00 .....P2. ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 11 bytes] ===================================== 6F 07 80 02 00 41 82 01 01 90 00 o....A..... ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 5 bytes] ===================================== 00 B0 00 00 01 ..... ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 3 bytes] ===================================== 30 90 00 0.. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called processing FCI bytes bytes in file: 65 type: working EF EF structure: transparent [opensc-pkcs11] card-starcos.c:356:starcos_select_fid: returning with: 0 [opensc-pkcs11] card.c:554:sc_select_file: returning with: 0 called; 65 bytes at index 0 [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 5 bytes] ===================================== 00 B0 00 00 41 ....A ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 67 bytes] ===================================== 30 3F 02 01 00 04 08 89 90 55 23 00 04 16 24 0C 0?.......U#...$. 0E 4F 70 65 6E 53 43 20 50 72 6F 6A 65 63 74 80 .OpenSC Project. 0B 4F 70 65 6E 53 43 20 43 61 72 64 03 02 04 10 .OpenSC Card.... 85 0F 31 39 37 30 31 30 31 32 31 34 33 34 31 37 ..19701012143417 5A 90 00 Z.. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] iso7816.c:132:iso7816_read_binary: returning with: 65 [opensc-pkcs11] card.c:430:sc_read_binary: returning with: 65 called, left=65, depth 0 Looking for 'TokenInfo', tag 0x1000010 decoding 'TokenInfo' called, left=63, depth 1 Looking for 'version', tag 0x2 decoding 'version' Looking for 'serialNumber', tag 0x4, OPTIONAL decoding 'serialNumber' Looking for 'manufacturerID', tag 0xc, OPTIONAL decoding 'manufacturerID' Looking for 'label', tag 0x20000000, OPTIONAL decoding 'label' Looking for 'label-tw', tag 0x21000000, OPTIONAL not present Looking for 'tokenflags', tag 0x3 decoding 'tokenflags' Looking for 'seInfo', tag 0x1000010, OPTIONAL not present Looking for 'recordInfo', tag 0x21000001, OPTIONAL not present Looking for 'supportedAlgorithms', tag 0x21000002, OPTIONAL not present Looking for 'issuerId', tag 0x20000003, OPTIONAL not present Looking for 'holderId', tag 0x20000004, OPTIONAL not present Looking for 'lastUpdate', tag 0x20000005, OPTIONAL decoding 'lastUpdate' Looking for 'preferredLanguage', tag 0x13, OPTIONAL not present [opensc-pkcs11] asn1.c:1202:asn1_decode: returning with: 0 [opensc-pkcs11] asn1.c:1202:asn1_decode: returning with: 0 [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] reader-pcsc.c:670:pcsc_unlock: called Binding to PKCS#15, rc=0 4: Detected framework 0. Creating tokens. called, path=3f0050154401, index=0, count=-1 [opensc-pkcs11] card.c:285:sc_lock: called [opensc-pkcs11] reader-pcsc.c:637:pcsc_lock: called called; type=2, path=3f0050154401 [opensc-pkcs11] card-starcos.c:367:starcos_select_file: called current path (path, valid): (len: 0) [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 8 bytes] ===================================== 00 A4 00 00 02 3F 00 00 .....?.. ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 2 bytes] ===================================== 62 84 b. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 7 bytes] ===================================== 00 A4 00 0C 02 3F 00 .....?. ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 2 bytes] ===================================== 90 00 .. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] card-starcos.c:356:starcos_select_fid: returning with: 0 [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 8 bytes] ===================================== 00 A4 00 00 02 50 15 00 .....P.. ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 2 bytes] ===================================== 62 84 b. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 7 bytes] ===================================== 00 A4 00 0C 02 50 15 .....P. ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 2 bytes] ===================================== 90 00 .. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] card-starcos.c:356:starcos_select_fid: returning with: 0 [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 8 bytes] ===================================== 00 A4 00 00 02 44 01 00 .....D.. ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 11 bytes] ===================================== 6F 07 80 02 01 00 82 01 01 90 00 o.......... ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 5 bytes] ===================================== 00 B0 00 00 01 ..... ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 3 bytes] ===================================== 30 90 00 0.. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called processing FCI bytes bytes in file: 256 type: working EF EF structure: transparent [opensc-pkcs11] card-starcos.c:356:starcos_select_fid: returning with: 0 [opensc-pkcs11] card.c:554:sc_select_file: returning with: 0 called; 256 bytes at index 0 [opensc-pkcs11] card.c:285:sc_lock: called called; 128 bytes at index 0 [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 5 bytes] ===================================== 00 B0 00 00 80 ..... ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 130 bytes] ===================================== 30 43 30 1A 0C 14 53 65 63 75 72 69 74 79 20 4F 0C0...Security O 66 66 69 63 65 72 20 50 49 4E 03 02 06 C0 30 03 fficer PIN....0. 04 01 FF A1 20 30 1E 03 02 00 0D 0A 01 01 02 01 .... 0.......... 06 02 01 08 02 01 08 80 01 01 04 01 00 30 06 04 .............0.. 04 3F 00 50 15 FF FF FF FF FF FF FF FF FF FF FF .?.P............ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 90 00 .. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] iso7816.c:132:iso7816_read_binary: returning with: 128 [opensc-pkcs11] card.c:430:sc_read_binary: returning with: 128 called; 128 bytes at index 128 [opensc-pkcs11] apdu.c:516:sc_transmit_apdu: called [opensc-pkcs11] card.c:285:sc_lock: called Outgoing APDU data [ 5 bytes] ===================================== 00 B0 00 80 80 ..... ====================================================================== [opensc-pkcs11] reader-pcsc.c:175:pcsc_internal_transmit: called Incoming APDU data [ 130 bytes] ===================================== FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................ 90 00 .. ====================================================================== [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] iso7816.c:132:iso7816_read_binary: returning with: 128 [opensc-pkcs11] card.c:430:sc_read_binary: returning with: 128 [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] card.c:427:sc_read_binary: returning with: 256 [opensc-pkcs11] card.c:312:sc_unlock: called [opensc-pkcs11] reader-pcsc.c:670:pcsc_unlock: called called, left=256, depth 0 Looking for 'pin', tag 0x1000010 decoding 'pin' called, left=67, depth 1 Looking for 'commonObjectAttributes', tag 0x1000010 decoding 'commonObjectAttributes' called, left=26, depth 2 Looking for 'label', tag 0xc, OPTIONAL decoding 'label' Looking for 'flags', tag 0x3, OPTIONAL decoding 'flags' Looking for 'authId', tag 0x4, OPTIONAL not present Looking for 'userConsent', tag 0x2, OPTIONAL not present Looking for 'accessControlRules', tag 0x1000010, OPTIONAL not present [opensc-pkcs11] asn1.c:1202:asn1_decode: returning with: 0 Looking for 'classAttributes', tag 0x1000010 decoding 'classAttributes' called, left=3, depth 2 Looking for 'authId', tag 0x4 decoding 'authId' [opensc-pkcs11] asn1.c:1202:asn1_decode: returning with: 0 Looking for 'subClassAttributes', tag 0x21000000, OPTIONAL not present Looking for 'typeAttributes', tag 0x21000001 decoding 'typeAttributes' called, left=32, depth 2 Looking for 'pinAttributes', tag 0x1000010 decoding 'pinAttributes' called, left=30, depth 3 Looking for 'pinFlags', tag 0x3 decoding 'pinFlags' Looking for 'pinType', tag 0xa decoding 'pinType' Looking for 'minLength', tag 0x2 decoding 'minLength' Looking for 'storedLength', tag 0x2 decoding 'storedLength' Looking for 'maxLength', tag 0x2, OPTIONAL decoding 'maxLength' Looking for 'pinReference', tag 0x20000000, OPTIONAL decoding 'pinReference' Looking for 'padChar', tag 0x4, OPTIONAL decoding 'padChar' Looking for 'lastPinChange', tag 0x18, OPTIONAL not present Looking for 'path', tag 0x1000010, OPTIONAL decoding 'path' called, left=6, depth 4 Looking for 'path', tag 0x4 decoding 'path' Looking for 'index', tag 0x2, OPTIONAL not present Looking for 'length', tag 0x20000000, OPTIONAL not present [opensc-pkcs11] asn1.c:1202:asn1_decode: returning with: 0 [opensc-pkcs11] asn1.c:1202:asn1_decode: returning with: 0 [opensc-pkcs11] asn1.c:1202:asn1_decode: returning with: 0 [opensc-pkcs11] asn1.c:1202:asn1_decode: returning with: 0 [opensc-pkcs11] asn1.c:1202:asn1_decode: returning with: 0 called, left=187, depth 0 Found 1 authentication objects Found 0 private keys Found 0 public keys Found 0 certificates Found 0 data objects All tokens created 4: Detection ended C_Initialize: result = 0 Getting slot listing 0: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0 0: Card absent 0: smart card removed 1: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0 1: Card absent 1: smart card removed 2: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0 2: Card absent 2: smart card removed 3: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0 3: Card absent 3: smart card removed 4: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 1 4: Detection ended was only a size inquiry (8) Getting slot listing 0: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0 0: Card absent 0: smart card removed 1: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0 1: Card absent 1: smart card removed 2: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0 2: Card absent 2: smart card removed 3: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0 3: Card absent 3: smart card removed 4: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 1 4: Detection ended returned 8 slots Opening new session for slot 0 0: Detecting smart card [opensc-pkcs11] sc.c:196:sc_detect_card_presence: called [opensc-pkcs11] reader-pcsc.c:282:refresh_slot_attributes: called [opensc-pkcs11] sc.c:201:sc_detect_card_presence: returning with: 0 0: Card absent 0: smart card removed
_______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel