Marc Rios Valles wrote:
> Hi,
> 
> I am adapting the source code of a driver that works with opensc-0.11.4
> to works with opensc-0.11.7. I am having problems with the function
> sc_pkcs15init_change_attrib and concretly with this lines:
> 
>  if (r >= 0) {
>                  sc_file_t *file;
>                  r = sc_profile_get_file_by_path(profile, &df->path,
> &file); <-- HERE IS MY PROBLEM
>                  if(r<0) return r;
>                 r = sc_pkcs15init_update_file(profile, card,
>                                 file, buf, bufsize);
>                 free(buf);
>                 sc_file_free(file);
>         }
> 
> In the line I have marked the profile loaded is the default of
> opensc(pkcs15.profile) and my files are not in the same place. I don't
> know if this line is very necessary because we had in the past the
> following:
> 
>   if (r >= 0) {
>       r = sc_pkcs15init_update_file(profile, card,
>             df->file, buf, bufsize);
>             free(buf);
>   }
> 

It looks like in 0.11.1 at least, it would try and find a DF
based on the type, and set the ACL on it. It may have worked for
you if you only had one DF of the same type.

It looks like the new code is trying to use the information in the
profile, to make sure the attributes are set on the correct file.


> And works ok... What should I do? 

You may have been lucky it worked.

I see that there are 14 profiles for other cards.
Have you tried creating your own profile?

> 
> Thank you very much

-- 

  Douglas E. Engert  <deeng...@anl.gov>
  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