Andreas Jellinghaus wrote:
> On Monday 09 July 2007 12:15:41 kamal kumar wrote:
>> Hi all,
>> I need clarification. Is P15 emulation provided only
>> for using certificates/keys from the card.
>>
>> As i told you earlier, I am emulating p15 structures
>> for my card and trying to support operations like
>> loading of keypair and certificate to card.

You can use a combination of a card-<yourcard>.c
and pkcs15-<yourcard>.c modules. The pkcs15-<yourcard>.c
handles the emulation.

The card-<yourcard>.c frontends the iso7816.c to handle
any card specific commands.

You can also do some special scripts and use the
opensc-tool -s xxxxx to preform a specific APDU sequence.
This works if your operation can done with one APDU command
per session.

Or as in my case I needed to authenticate to the card using
3des before doing some operations like generate a key pair
on the card, and save the public key to a file.

The piv-tool is a modified version of opensc-tool with some
extra options. It ends up calling the card-piv.c  without using
the pkcs15 emulation.

piv-tool can then load the certificate to the card.

You could write your own <yourcard>-tool.c and do something similar.

>>
>> Is there any card opensc implementation that emulates
>> P15 structures and also support these operations. Does
>> OpenSC restrain p15 emulation for only reading data.
> 
> I'n not 100% sure, but i think the pkcs#15 emulation has so far only ben 
> unsed 
> on pre-initialized cards that cannot be altered. thus it might support only 
> read only mode so far. but I might be wrong. Nils?
> 
> Regards, Andreas
> _______________________________________________
> opensc-devel mailing list
> opensc-devel@lists.opensc-project.org
> http://www.opensc-project.org/mailman/listinfo/opensc-devel
> 
> 

-- 

  Douglas E. Engert  <[EMAIL PROTECTED]>
  Argonne National Laboratory
  9700 South Cass Avenue
  Argonne, Illinois  60439
  (630) 252-5444
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to