Hi Peter

On 05/27/2012 03:50 PM, Peter Stuge wrote:
> Nguyễn Hồng Quân wrote:
>> I'm starting from the current codebase, which uses a emulation layer, 
>> so I don't know other choice than continue with this approach.
> First create the improved infrastructure in OpenSC that your work
> needs.
Now I haven't understood the OpenSC core very well, so I choose the
solution of following the current infrastructure of OpenSC, to avoid
making it a mess. Later, when I would understand OpenSC well, I will
switch to other approach.
>>> Maybe it would be better to have a single "sticky pkcs15-ish mapping
>>> for a fixed profile card" in a single location (like the pkcs15
>>> emulation drivers) and allow pkcs15-tool (which does not try to create
>>> any PKCS#15 structures) to re-generate exposed key slots and replace
>>> exposed certificate slots. And extend that API as needed.
>> I don't really understand this idea.
>> - Now, to solve the problem of the path I mentioned at the beginning of 
>> this mail thread, I change a bit in gpg_select_file, to automatically 
>> ignore the part of DF PKCS15-AppDF (5015). Does it resemble the idea 
>> "sticky pkcs15-ish mapping for a fixed profile card"?
> Yes and no. The point is that mapping between card layout and p15
> will happen only in a single place.
>
The mapping I done happens in card driver code (card-openpgp.c) (earlier
I wanted it to happen in *.profile file, but found no way). Is it
considered "single place"?
>> - What "re-generate exposed key slots and replace exposed certificate 
>> slots" is for?
> Code working with keys and certificates should never work with p15
> operations for modifying structure, but be restricted to the
> structure exposed by the p15 mapping.
>
> Modifying that (virtual) p15 structure would use another API.
Thanks,

It seems that my initial question is not clear, leading to misunderstanding.

> I need a help to create pkcs15init profile structure so that I can
> change/rewrite the canonical path. 
I meant to create a *.profile ("sructure" here is not pkcs15 structure,
but the *.profile structure) so that the path understood by PKCS15,
after go through this profile to down to driver, will be modifiedto be
understandable by the driver.

    PKCS15   (3F00:5015:AABB)
          |
+--------------+
| profile file  |
+--------------+
          |
  Card driver  (3F00:AABB)


However, at this time of my writing, this is no longer needed. I brought
the role of "translating path" from profile file to the card driver itself.

-- 
Regards,
Quân

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

Reply via email to