Martin Paljak wrote:
> On May 14, 2010, at 12:20 , Viktor TARASOV wrote:
>   
>> Martin Paljak wrote:
>>
>>     
>>> For some cases having a lock on the card during C_SignInit -> 
>>> C_Sign(Final), but this probably does not concern the cache invalidation 
>>> between C_Login and C_Sign.
>>>
>>>       
>> Do we really need to invalidate cache inside the sc_(un)lock?
>> IMHO, it should be invalidated only when serious 'file select' error 
>> happens .
>>     
>
> Maybe not. In the end, the card should enforce the final say on how the 
> things are, the cache only exists to speed things up.
>   

For me it also helps to keep the 'verified' status of the local PINs, as 
in case with Feitian card.

> From usage point of view, after the card has been initialized, the structures 
> on the card don't change that often, so it is safe to say that the file cache 
> is mostly used to keep track of the "cwd" and to cache metadata about files 
> in the memory.
>   

It do not concerns the file cache in pkcs15.
Actually in the card->cache there is only 'current_path'.

> In addition to SELECT FILE, responses like 6A82 (File not found) from 
> file-oriented commands should be trapped. 
> Are there reasons why this should not be implemented?
>   
I don't see such reasons.

I think that decision to invalidate card->cache should not be taken at 
the low level (in libopensc after every 'select file' error), but at the 
upper level (pkcs15) when looking to re-try some failed high-level 
operation. It still needs to be thought over .







-- 
Viktor Tarasov  <viktor.tara...@opentrust.com>

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

Reply via email to