starcos_process_acl, called by starcos_create_file has a small bug. It uses the wrong field in the sc_file_t to decide what the EF structure is. ( found while debugging the one-shot tool I wrote to finish initializing my ITSEC-P token)

Index: src/libopensc/card-starcos.c
===================================================================
--- src/libopensc/card-starcos.c        (revision 2935)
+++ src/libopensc/card-starcos.c        (working copy)
@@ -639,7 +639,7 @@
               *p++ = tmp;                     /* SM byte     */
*p++ = 0x00; /* use the least significant 5 bits
                                                * of the FID as SID */
-               switch (file->type)
+               switch (file->ef_structure)
               {
               case SC_FILE_EF_TRANSPARENT:
                       *p++ = 0x81;

Attachment: p7sLs9qYu4hzh.p7s
Description: S/MIME cryptographic signature

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

Reply via email to