On Tue, 2009-03-10 at 18:19 +0100, Andreas Jellinghaus wrote: > Hi Marc, Hi andreas > could you be more specific, what your problem is? > > maybe you can debug your code and tell us if > df->file and file differ after the sc_profile_get_file_by_path > call. > In df->file I have the correct structure with the path 3f0050156001 but when the program arribes to the sc_profile_get_file_by_path it searches this path in the pkcs15.profile and obviously retuns SC_FILE_NOT_FOUND.
> getting a file structure from profile data is quite normal > in opensc code as far as I can see, as you need it for every > new file (so you know what the ACL on the file should look like). If the sc_profile_get_file_by_path searches in my profile (in this case ceres.profile) it will find the file but I don't know why is searching only in pkcs15.profile. > > so if your code has a problem with that change - which was part > of the new entersafe driver and seems to fix a problem they ran > into, but did not create problems for anyone else as far as I > can see - it would be interesting to see what the problem > exactly is. how do the file and df->file structures differ? > > > 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: > > is your "my files are not in the same place" comment related to the > profile files (pkcs15.profile and <yourdriver>.profile, or to your card > profile (for example if you don't implement pkcs15 but some other format)? > I implement pkcs15 but the files aren't in the same place as pkcs15.profile. When I say 'my files are not in the same place' I refer that in pkcs15.profile the PKCS15-PrKDF is 3f0050154002 and in my case is 3f0050156001. > as far as I know the profile datastructure in opensc is created > by first loading the generic pkcs15.profile and then the <driver>.profile. > you can > * specify a different profile using an option. > * use an option block within pkcs15.profile > * overwrite every (or only most?) settings from pkcs15.profile in your driver > profile > * you can configure in the opensc.conf where the profile directory is. > * your profile directory could contain a different pkcs15.profile file if > you plan to keep your version of opensc closed. > > but much of the opensc code is hard coded to pkcs15, at least the pkcs15init > directory (as the name suggest). so if you want to modify opensc to create > other files in other places, that might be more changes everywhere. > > but I'm neither sure what you exactly want to do, nor what the problem is. > the change you mention makes sure to load the file structure from the profile > data, so it will contain ACL information. what information is lost / different > in your case compared to the old file structure? > > you can use gdb to break on that function, and then single step till the file > data is loaded, and use print on file and df->file to see if there are > differences. > > good luck! > > Regards, Andreas If we can't ommit this line, how can I make possible to load my profile in that line and not pkcs15.profile??? Thanks for all -- Marc Rios Vallès m...@c3po.es C3PO, S.A. http://www.c3po.es C/ Alejandro Goicoechea, 6 Local 9 - 08960 St. Just Desvern, Barcelona Tel. 93 417 99 55 - Fax 93 253 12 80 _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel