Hello Andre,

On 14.01.2011 04:24, Andre Zepezauer wrote:
> please have a look at PKCS#15 "6.8.2 Pin objects" for the definition of
> local and global PIN objects. There is no mention of storage location.
There is mention of 'path'.
The difference between 'global' and 'local' is that the first one can be 
verified from any location on the card,
the second one is 'visible' only from somewhere under the DF (or application) 
where it's defined.

So, we need (or, if you like, it's useful) to have 'path' defined for the local 
PINs, to be able to select it's path before verification.

That's what sc_pkcs15_verify_pin() is actually doing.
http://www.opensc-project.org/opensc/browser/trunk/src/libopensc/pkcs15-pin.c#L246

> So, why trying to fix something that's not broken?
No one said that something is broken.
It's a kind reverence to some native PKCS#15 card structures that happens to 
not have 'path' in 'PinAttributes' for the local PINs.


> BTW it segfaults.

The 'valgrind' output or OpenSC debug logs would be greately appreciated .

On of the possible reason is printing of not completely initialized 'sc_path' 
variables .
'AID' member was introduced into 'struct sc_path'. Actually in OpenSC  source 
'generally' this data type is initialized member by member, 'memset' is not 
always applied to the entire location .
I was trying to track such a cases, but, probably, there are still some of them.

Once more, your help would be appreciated a lot.

> Regards
> Andre

Kind wishes,
Viktor.


>


-- 
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