Hello,
On Sep 2, 2010, at 12:37 PM, Aventra development wrote:
>> On Sep 1, 2010, at 7:23 PM, Aventra development wrote:
>>> - Card initialization and finalization (activation)
>>> From the patch:
>> 
>> +static int card_state;
>> +
>> 
>> card_state is now a card driver property, not a card property. I suspect
> this
>> is not what you want.
>> 
> [TSj] What we want is to maintain the cards state (activated or creation)
> and use it internally.
> Can the driver itself set this value or is it maintained elsewhere?

A static file variable is shared among all instances of the driver, it is not a 
card property. If you want to associate it with a card, you need to use struct 
sc_card->drv_data (a void pointer) [1] [2].

>>> - Key generation (thanks to Viktor, however now I have some problem with
>> pcsc transmit failing after some time while the card is generating the
> key)
>> Which reader do you use? Can you try with some other reader?
> [TSj] I have used ACS ACR38 CCID and Omnikey Cardman 3121, neither works. 
> I've attached a log (opensc-debug gen-key.log).
Key generation succeeds (in 7 seconds), but another command (select file) is 
failing:

0xb7b086c0 09:54:00.138 [pkcs15-init] 
card-myeid.c:1004:myeid_generate_store_key: returning with: 0
0xb7b086c0 09:54:00.138 [pkcs15-init] card-myeid.c:1096:myeid_card_ctl: 
returning with: 0
0xb7b086c0 09:54:00.138 [pkcs15-init] card.c:688:sc_card_ctl: returning with: 0
0xb7b086c0 09:54:00.139 [pkcs15-init] card.c:543:sc_select_file: called; 
type=2, path=3f0050154b05
0xb7b086c0 09:54:00.139 [pkcs15-init] card-myeid.c:192:myeid_select_file: called
0xb7b086c0 09:54:00.139 [pkcs15-init] apdu.c:521:sc_transmit_apdu: called
0xb7b086c0 09:54:00.139 [pkcs15-init] card.c:290:sc_lock: called
0xb7b086c0 09:54:00.139 [pkcs15-init] reader-pcsc.c:235:pcsc_transmit: reader 
'OmniKey CardMan 3121 00 00'
0xb7b086c0 09:54:00.139 [pkcs15-init] apdu.c:187:sc_apdu_log: 
Outgoing APDU data [    9 bytes] =====================================
00 A4 08 00 04 50 15 4B 05 .....P.K.
======================================================================
0xb7b086c0 09:54:00.139 [pkcs15-init] reader-pcsc.c:168:pcsc_internal_transmit: 
called
0xb7b086c0 09:54:02.250 [pkcs15-init] reader-pcsc.c:194:pcsc_internal_transmit: 
OmniKey CardMan 3121 00 00:SCardTransmit/Control failed: 0x80100016
0xb7b086c0 09:54:02.250 [pkcs15-init] 
reader-pcsc.c:346:pcsc_detect_card_presence: called



>>> Anyway it's a step forward. If somebody is able to help with the Firefox
>> problem or knows why the pkcs15-tool does not work, feel free to edit the
> code
>> or send some information to me so we will get also these working.
>> Please provide a debug log.
> [TSj] The Firefox certificate enrolment does not work. How do I enable debug
> logging for this?

The same way as for key generation. I created a wiki page with information on 
how to report bugs[3]. It should cover the basics (to hopefully avoid "My card 
does not work, help!"  messages) but should also give more advanced tips for a 
good bug report, including simple debugging/troubleshooting tips. Feel free to 
improve or ask for more if needed.

[1] 
http://www.opensc-project.org/opensc/browser/trunk/src/libopensc/card-piv.c#L1880
[2] 
http://www.opensc-project.org/opensc/browser/trunk/src/libopensc/card-piv.c#L1821
[3] http://www.opensc-project.org/opensc/wiki/ReportingBugs
-- 
Martin Paljak
@martinpaljak.net
+3725156495

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to