Hi Snit, thanks a lot for the info. I have tried loading the the applet to the card with no success. The bin file generation was per your instructions. I tried loading both the helloworld.bin file,  which comes with gpshell and another one I generated, same results.

Heres the output:
=================================
establish_context
card_connect
select -AID a0000000030000
open_sc -security 1 -keyind 0 -keyver 0 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f // Open secure channel
install_for_load -AID a00000000101 -nvCodeLimit 7096
load -file binfile/CardEdge.bin
load_applet() returns 0x80206A80 (6A80: Wrong data / Incorrect values in command data.)
==============================

The list and delete commands were ok though. As a suggestion, it would be great if GPShell could take a cap file to load (and generate the bin file internally), as all Sun documentation point to the cap as the file to be loaded into the card.

Thanks a lot for your time.
Matheus
 

Hi, Matheus,

Just to complement Karsten's comment, here's an example of exracting
contents from a .cap file and creating a .bin file.

cp com/sun/javacard/samples/HelloWorld/javacard/HelloWorld.cap .
jar xvf HelloWorld.cap
extracted: com/sun/javacard/samples/HelloWorld/javacard/Header.cap
extracted: com/sun/javacard/samples/HelloWorld/javacard/Directory.cap
extracted: com/sun/javacard/samples/HelloWorld/javacard/Applet.cap
extracted: com/sun/javacard/samples/HelloWorld/javacard/Import.cap
extracted: com/sun/javacard/samples/HelloWorld/javacard/ConstantPool.cap
extracted: com/sun/javacard/samples/HelloWorld/javacard/Class.cap
extracted: com/sun/javacard/samples/HelloWorld/javacard/Method.cap
extracted: com/sun/javacard/samples/HelloWorld/javacard/StaticField.cap
extracted: com/sun/javacard/samples/HelloWorld/javacard/RefLocation.cap
extracted: com/sun/javacard/samples/HelloWorld/javacard/Descriptor.cap

cat com/sun/javacard/samples/HelloWorld/javacard/Header.cap
com/sun/javacard/samples/HelloWorld/javacard/Directory.cap
com/sun/javacard/samples/HelloWorld/javacard/Import.cap
com/sun/javacard/samples/HelloWorld/javacard/Applet.cap
com/sun/javacard/samples/HelloWorld/javacard/Class.cap
com/sun/javacard/samples/HelloWorld/javacard/Method.cap
com/sun/javacard/samples/HelloWorld/javacard/StaticField.cap
com/sun/javacard/samples/HelloWorld/javacard/ConstantPool.cap
com/sun/javacard/samples/HelloWorld/javacard/RefLocation.cap
com/sun/javacard/samples/HelloWorld/javacard/Descriptor.cap >
HelloWorld.bin

I have run this in cygwin.  You can see I have opened up
HelloWorld.cap and concatanated all the resulting .cap files into one
file, HelloWorld.bin.  Try the same thing to your .cap file, and
please let us know if it doesn't work.

I will add this to GPShell README in the next release.

Thanks,


_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to