Hi Andreas,


>> Using opensc-explorer, I store a 40K  Bzip2 file and
>> then get it back on disk.
>> The two files checksums don't match and the file
>> I retrieve from the card is corrupted.
>
> how do you store and retreive the file?
> with opensc-explorer? one of the pkcs15* tools?
> pkcs11-tool or pkcs11 api?

I used the opensc-explorer to store and retrieve the file.
Here are the actions I performed:

opensc-explorer:
mkdir 8888 256
cd 8888
create 1F00 41250
put 1F00 blog.tar.bz
get 1F00 new.tar.bz
quit

that works? as far as I remember cardos, a directory allocates space for all children, too. so if you create a directory with 10 kb total space, you could
only files in it with a total size of less than 10kb.

Yes, it does work. At least, this works this way
when writing 10K files on the cards.

try creating a 42kb directory, maybe it works then.

No, it doesn't work. It seems that creating a directory
this big will "consume" space on the card and
I 'm not able to create the target file:

OpenSC [3F00]> mkdir 8780 42000
OpenSC [3F00]> cd 8780
OpenSC [3F00/8780]> create 1F00 41452
card-cardos.c:225:cardos_check_sw: not enough memory
card.c:344:sc_create_file: returning with: Card command failed
CREATE FILE failed: Card command failed


also how big is new.tar.gz? and the creatd 1f00 did not fail? strange.

The new file retrieve from the card has exactly the same size.

Best regards,

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

Reply via email to