In answer to my own e-mail about leng of PIN, it looks like the
following change is needed

--- pkcs15-gemsafeV1.c  (revision 3296)
+++ pkcs15-gemsafeV1.c  (working copy)
@@ -420,8 +420,8 @@

         if (path)
                 info->path = *path;
-       if (type == SC_PKCS15_PIN_TYPE_BCD)
-               info->stored_length /= 2;

         return sc_pkcs15emu_add_object(p15card,
                                        SC_PKCS15_TYPE_AUTH_PIN,

The divide by 2 looks like a hold over from some previous version
of OpenSC. Line 262 in sec.c is doing the same thing for BCD encoded pins.

So now I can get further, but pkcs15_prkey_sign is failing...


Douglas E. Engert wrote:
> 
> Ludovic Rousseau wrote:
>> 2007/11/9, Douglas E. Engert <[EMAIL PROTECTED]>:
>>> We also have some newer GemSAFE card used with Windows, with
>>> ATR:   3b:7a:94:00:00:80:65:a2:01:01:01:3d:72:d6:43
>>> Gemplus GemXpresso Pro R3 E32 PK (I believe), but we never wrote the driver
>>> for these Would you expect that your driver could work with these?
>>> If it could, I would be interested in trying it.
>> GemSafe exists in 3 different main versions: GPK, JavaCard applet V1
>> and JavaCard applet v2.
>>
>> I guess your cards contain an applet V1 so could be used by David's patch.
> 
> The ATR above is listed in  as one of the gemexpresso_atrs[].  It looks
> like you added it to the SVC, as it was not in Dave's original source.
> 
> I built against the SVN, and pkcs15-tool can read the certificate.
> But trying a pkcs#11 application to use the cert tried the
> pin operation:
> 
>    00 20 00 01 04 nn nn nn FF
> 
> where n looks like a BCD version of the correct pin.
> but it returns 67 00
> 
> Dave's code listed the max pin len as 16, which  would be 8 bytes
> but the command set was only for 4 bytes. I would have guessed it would be
>   00 02 00 01 08 nn nn nn FF FF FF FF FF
> 
> I don't know if the pin attributes are different for this card or not.
> 
> All the other card routines use  sc_pkcs15emu_add_pin_obj
> but pkcs15-gemsafeV1.c is using a stic version of sc_pkcs15emu_add_pin
> that calls sc_pkcs15emu_add_object. I don't see a problem here,
> but could it use sc_pkcs15emu_add_pin_obj instead?
> 
> 
> 
> Minor point, the routines card-gemsafeV1.c, pkcs15-gemsafeGPK.c
> and pkcs15-gemsafeV1.c are the only source files with uppercase letters.
> For consistency, and maybe problems with Windows, could these be lowercase?
> 
> 
> 
> 
> 
> 
>> bye
>>
> 

-- 

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

Reply via email to