Hi,
Sorry I couldn't respond earlier,
I have been able to (partially) use OpenSC with MuscleCard applet in
Windows. I ran into many problems which I have described in the posts.
So, after using all the new versions from the OpenSC Trunk folder, I
have been able (with the old applet) to personalize the applet using the
sequence form the recent post (00A4040007A0000003230101;
B02A000038084D7573636C65303004010830303030303030300830303030303030300502
08303030303030303008303030303030303000001770000201)
After that I ran into "File not found" problem and I have realised the
following ( I have described that in the posts too). I repeat: "the 5015
folder is being created but after that I get "File not found" error.
Looking in debug log I can see it is trying to create PKCS15-AODF with
file-id of 4401, but the command sent to the card is B0 5A 00 00 0E 01
44 15 50.....while it should be B0 5A 00 00 0E 50 15 44 01. So it is
being reversed and I suppoes it is related to the BIG ENDIAN problem
thath was solved by using function bebytes2ulong and similar. The 5015
folder is created OK so muscle_create_file is working fine but
muscle_create_file is not."
So I did the following:
- instead of calling mscfs_lookup_local(fs, file->id, (u8*)&objectId); I
have put:
objectId[0] = fs->currentPath[0];
objectId[1] = fs->currentPath[1];
objectId[2] = (file->id >> 8) & 0xFF;
objectId[3] = file->id & 0xFF;
and after that modified the call to msc_create_object to: r =
msc_create_object(card, bebytes2ulong(objectId), objectSize, read,
write, delete); If I can see, muscle_create_directory is doing the
similat thing. I don't know if this is the error but this works for me
on Windows...
That was all. After that I have successfully loaded the PKCS#12
certificate onto the card, installed opensc PKCS#11 module and
successfully signed my email in Thunderbird. I didn't get any further
because of some other work I had to do...but I would really be happy if
we could solve the problems and use the MuscleCard applet in OpenSC.
regards, dejan
> -----Original Message-----
> From: Andreas Jellinghaus [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 25, 2006 11:50 AM
> To: Gambin Dejan
> Cc: 'MUSCLE'; [EMAIL PROTECTED]; 'Thomas
> Harning'; Corcoran David
> Subject: Re: [opensc-user] RE: [Muscle] Muscle card support
> for OpenSC - solved this problem
>
> I'm not sure if I have the same problem Dejan ran into, but
> pkcs15-init is still failing for me. Now the problem is ...
> card.c:531:sc_select_file: called; type=2, path=3f0050154946
> apdu.c:504:sc_transmit_apdu: called
> card.c:311:sc_unlock: called
> apdu.c:504:sc_transmit_apdu: called
> card.c:311:sc_unlock: called
> apdu.c:504:sc_transmit_apdu: called
> card.c:311:sc_unlock: called
> apdu.c:504:sc_transmit_apdu: called
> card.c:311:sc_unlock: called
> card-muscle.c:334:select_item: returning with: -1201
> card-muscle.c:404:muscle_select_file: returning with: -1201
> card.c:553:sc_select_file: returning with: -1201 Failed to
> create PKCS #15 meta structure: File not found
>
> any idea? Here is what I did to the token
> http://www.opensc-project.org/opensc/wiki/Cyberflex
>
> and I ran pkcs15-init -C --so-pin 123456 --so-puk 78907890
> and entered "00000000" for the Unspecified PIN [Reference 1].
>
> full pkcs15-init log file is attached.
>
> Thanks for your help!
>
> Regards, Andreas
>
> Dejan Gambin wrote:
> > Hi,
> >
> > I have been able to solve the problem with muscle_create_file using
> > the
> > following:
> >
> > - instead of calling mscfs_lookup_local(fs, file->id,
> (u8*)&objectId);
> > I have put:
> > objectId[0] = fs->currentPath[0];
> > objectId[1] = fs->currentPath[1];
> > objectId[2] = (file->id >> 8) & 0xFF;
> > objectId[3] = file->id & 0xFF;
> >
> > and after that modified the call to msc_create_object to: r =
> > msc_create_object(card, bebytes2ulong(objectId), objectSize, read,
> > write, delete); If I can see, muscle_create_directory is doing the
> > similat thing. I don't know if this is the error but this
> works for me on Windows...
> >
> > regards, dejan
>
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle