On Wed, 2010-11-03 at 17:19 +0100, Andre Zepezauer wrote: > On Wed, 2010-11-03 at 17:15 +0100, Ludovic Rousseau wrote: > > 2010/11/3 Andre Zepezauer <andre.zepeza...@student.uni-halle.de>: > > > On Wed, 2010-11-03 at 10:11 +0100, Viktor TARASOV wrote: > > >> webmas...@opensc-project.org wrote: > > >> > Revision: 4853 > > >> > Author: ludovic.rousseau > > >> > Date: 2010-11-02 07:59:46 +0000 (Tue, 02 Nov 2010) > > >> > > > >> > Log Message: > > >> > ----------- > > >> > sc_pkcs15init_read_info(): do not call sc_pkcs15init_parse_info() if > > >> > sc_select_file() failed. > > >> > > > >> > Thanks to Andre Zepezauer for the patch > > >> > http://www.opensc-project.org/pipermail/opensc-devel/2010-November/015216.html > > >> > > > >> > Modified Paths: > > >> > -------------- > > >> > trunk/src/pkcs15init/pkcs15-lib.c > > >> > > > >> > Modified: trunk/src/pkcs15init/pkcs15-lib.c > > >> > =================================================================== > > >> > --- trunk/src/pkcs15init/pkcs15-lib.c 2010-11-01 15:44:17 UTC > > >> > (rev 4852) > > >> > +++ trunk/src/pkcs15init/pkcs15-lib.c 2010-11-02 07:59:46 UTC > > >> > (rev 4853) > > >> > @@ -3518,8 +3518,6 @@ > > >> > if ((mem = malloc(len)) != NULL) { > > >> > r = sc_read_binary(card, 0, mem, len, 0); > > >> > } > > >> > - } else { > > >> > - r = 0; > > >> > } > > >> > > > >> > if (r >= 0) > > >> > > > >> > > >> After this change non-initialized card cannot be initialized with > > >> 'pkcs15-init' tool. > > >> > > >> At this line > > >> http://www.opensc-project.org/opensc/browser/trunk/src/tools/pkcs15-init.c#L436 > > >> 'sc_pkcs15init_bind()' should not fail for the non-initialized card. > > > > > > Correct. Before binding the p15app it should be checked, if command line > > > parameter -C was given. If it was: > > > > > > * given, then create a new p15app > > > * not given, then bind the p15app which may fail if there is no p15app > > > > Can you propose a patch?
When creating new p15 data structures, the profile can be specified like this: pkcs15-init -C -c cardos -p pkcs15 But should the following command be possible: pkcs15-init -W data.bin -c cardos -p pkcs15 -a 01 In other words, should it be allowed to specify a specific profile even when the card is still initialised? _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel