Ok, I am mapping the memory of smartcard for understand how it's store 
informations.
I am writing a emulator for pkcs15 and now i am be able to import the 
certificates in firefox.
I found where the smart store the public key..
For the moment i read the certificate passing the offset of bytes to 
read in manual mode.. :-)
But...firefox how recognize if the certificate is mine or of others? In 
this moment the certificate that i import with
sc_pkcs15emu_add_x509_cert(p15card, &cert_obj, &cert_info);
it's stored between certificate of others, not in personal certificates.

Other questions.. i see in the memory that is stored information about 
GemsafeCSP ( only if there are a pair keys).. it's necessary? I think 
that i can skip it,isn'it?

Best regards :)
Bye

Andreas Jellinghaus ha scritto:
> On Thursday 06 September 2007 18:35:14 Antonio Nastasi wrote:
>   
>> Hi,
>> I am writing a driver for gemsafe Xpresso 16K with applet v1..
>> But.. I have some questions:
>> 1)Are there documentation for knowledge the function I must implement?
>>     
>
> our best test tool is "pkcs11-tool --test --login". once that works 
> everything 
> essential is implemented. changeing pin codes and unblocking them should be
> implemented too.
>
>   
>> 2)I am reading the drivers for other cards..In particular Which are the
>> functions that i must implement for pkcs11 recognize the card?
>>     
>
> you need both a low level driver - sign, decrypt, read directory, read files 
> etc. - and a pkcs15 emulation - build in memory tables with the information
> we expect for pkcs15 cards. the low level drivers are card-NAME.c,
> the pkcs15 emulation drivers are pkcs15-NAME.c, both in src/libopensc/.
>
>   
>> 3)For opensc-tool i haven't problem: I have write a card-gemsafeV1.c and
>> modified ctx.c and opensc.h and the  opensc-tool recognize the atr and
>> initialize the card with aid of applet....
>>     
> sound good so far!
>
>   
>> I am be able to read the 
>> public EF with ID 0004 and recognize where begin and finish the
>> files..... but what i must put in buf for example in list_files:
>> static int gemsafeV1_list_files(sc_card_t *card, u8 *buf, size_t bufLen)
>>     
>
> fill the buffer with file id's, i.e. two bytes per file name.
> return the number of bytes you put into the buffer.
>
> Regards, Andreas
>
>   


-- 
Nastasi Antonio
GPG-Key: 0xDA3574F0


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

Reply via email to