JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html
https://ftsafe.en.alibaba.com/index.html
Including new Packages
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3055
- Contact:
Re: Including new Packages
You can change the key value in the util page of pyApdutool.
If can't, there is a .ini file in the same directory of pyApdutool. In the .ini file, you can find the default key value 0x40~0x4F, change it to your own.
If can't, there is a .ini file in the same directory of pyApdutool. In the .ini file, you can find the default key value 0x40~0x4F, change it to your own.
sense and simplicity
-
- Posts: 20
- Joined: Mon Nov 28, 2016 9:13 am
- Points :90
- Contact:
Re: Including new Packages
Below is the output of my code. How can I solve this sim.jar problem. Please help
Start jcvm_gp successfully.
Connect Simulator:Default successfully.
>> /card -a ""
ATR=3B 70 13 00 00
>> 00 A4 04 00 00
<< 6F 5C 84 08 A0 00 00 00 03 00 00 00 A5 04 73 4A 06 07 2A 86 48 86 FC 6B 01 60 0C 06 0A 2A 86 48 86 FC 6B 02 02 01 01 63 09 06 07 2A 86 48 86 FC 6B 03 64 0B 06 09 2A 86 48 86 FC 6B 04 02 15 65 0B 06 09 2B 85 10 86 48 64 02 01 03 66 0C 06 0A 2B 06 01 04 01 2A 02 6E 01 02 9F 65 01 FF 90 00
>> set-key 255/1/DES-ECB/404142434445464748494A4B4C4D4E4F 255/2/DES-ECB/404142434445464748494A4B4C4D4E4F 255/3/DES-ECB/404142434445464748494A4B4C4D4E4F
>> init-update 255
>> 80 50 00 00 08 E9 33 50 48 3C A1 12 49 1C
00 00 00 00 00 00 00 00 00 00 FF 02 00 00 3D 02 9C 31 C7 89 EF D0 62 15 07 19 B6 3F 90 00
>> ext-auth
>> 84 82 00 00 10 1C F4 D8 08 81 3A 86 AC 09 6E 5F 83 F8 1F D7 53
<< 90 00
>> upload "C:\workspace\helloStk\bin\helloStk\javacard\helloStk.cap"
>> 80 E6 02 00 1C 0F 01 02 03 04 05 06 07 08 09 06 08 05 03 02 05 08 A0 00 00 00 03 00 00 00 00 00 00 01
<< 00 90 00
>> 80 E8 00 00 FF C4 82 01 C9 01 00 19 DE CA FF ED 01 02 04 00 01 0F 01 02 03 04 05 06 07 08 09 06 08 05 03 02 05 02 00 2C 00 19 00 2C 00 12 00 1E 00 32 00 18 00 D1 00 0A 00 14 00 00 00 92 00 00 00 00 00 00 02 01 01 DB 03 25 09 A0 00 00 00 62 03 05 01 01 04 00 1E 02 00 01 07 A0 00 00 00 62 01 01 06 02 10 A0 00 00 00 09 00 03 FF FF FF FF 89 10 71 00 02 03 00 12 01 0E 01 02 03 04 05 06 07 08 09 06 08 05 03 02 00 99 06 00 18 43 80 03 03 00 03 07 02 00 00 00 CE 00 A8 80 02 00 81 01 01 08 81 00 00 07 00 D1 00 08 10 18 8C 00 03 18 10 08 90 0B 3D 03 10 53 38 3D 04 10 65 38 3D 05 10 72 38 3D 06 10 76 38 3D 07 10 69 38 3D 08 10 63 38 3D 10 06 10 65 38 3D 10 07 10 31 38 87 00 18 10 0D 90 0B 3D 03 10 48 38 3D 04 10 65 38 3D 05 10 6C 38 3D 06 10 6C 38 3D 07 10 6F 38 3D 08 10 20 38 3D 01
<< 6A 80 Incorrect parameters in the command data field
Download cap failed...
>> cardinfo
>> 80 F2 80 00 02 4F 00 00
<< 08 A0 00 00 00 03 00 00 00 01 9E 90 00
>> 80 F2 40 00 02 4F 00 00
<< 6A 88 Referenced data or reference data not found
>> 80 F2 10 00 02 4F 00 00
<< 6A 88 Referenced data or reference data not found
Card Manager AID : A000000003000000
Card Manager state : OP_READY
Start jcvm_gp successfully.
Connect Simulator:Default successfully.
>> /card -a ""
ATR=3B 70 13 00 00
>> 00 A4 04 00 00
<< 6F 5C 84 08 A0 00 00 00 03 00 00 00 A5 04 73 4A 06 07 2A 86 48 86 FC 6B 01 60 0C 06 0A 2A 86 48 86 FC 6B 02 02 01 01 63 09 06 07 2A 86 48 86 FC 6B 03 64 0B 06 09 2A 86 48 86 FC 6B 04 02 15 65 0B 06 09 2B 85 10 86 48 64 02 01 03 66 0C 06 0A 2B 06 01 04 01 2A 02 6E 01 02 9F 65 01 FF 90 00
>> set-key 255/1/DES-ECB/404142434445464748494A4B4C4D4E4F 255/2/DES-ECB/404142434445464748494A4B4C4D4E4F 255/3/DES-ECB/404142434445464748494A4B4C4D4E4F
>> init-update 255
>> 80 50 00 00 08 E9 33 50 48 3C A1 12 49 1C
00 00 00 00 00 00 00 00 00 00 FF 02 00 00 3D 02 9C 31 C7 89 EF D0 62 15 07 19 B6 3F 90 00
>> ext-auth
>> 84 82 00 00 10 1C F4 D8 08 81 3A 86 AC 09 6E 5F 83 F8 1F D7 53
<< 90 00
>> upload "C:\workspace\helloStk\bin\helloStk\javacard\helloStk.cap"
>> 80 E6 02 00 1C 0F 01 02 03 04 05 06 07 08 09 06 08 05 03 02 05 08 A0 00 00 00 03 00 00 00 00 00 00 01
<< 00 90 00
>> 80 E8 00 00 FF C4 82 01 C9 01 00 19 DE CA FF ED 01 02 04 00 01 0F 01 02 03 04 05 06 07 08 09 06 08 05 03 02 05 02 00 2C 00 19 00 2C 00 12 00 1E 00 32 00 18 00 D1 00 0A 00 14 00 00 00 92 00 00 00 00 00 00 02 01 01 DB 03 25 09 A0 00 00 00 62 03 05 01 01 04 00 1E 02 00 01 07 A0 00 00 00 62 01 01 06 02 10 A0 00 00 00 09 00 03 FF FF FF FF 89 10 71 00 02 03 00 12 01 0E 01 02 03 04 05 06 07 08 09 06 08 05 03 02 00 99 06 00 18 43 80 03 03 00 03 07 02 00 00 00 CE 00 A8 80 02 00 81 01 01 08 81 00 00 07 00 D1 00 08 10 18 8C 00 03 18 10 08 90 0B 3D 03 10 53 38 3D 04 10 65 38 3D 05 10 72 38 3D 06 10 76 38 3D 07 10 69 38 3D 08 10 63 38 3D 10 06 10 65 38 3D 10 07 10 31 38 87 00 18 10 0D 90 0B 3D 03 10 48 38 3D 04 10 65 38 3D 05 10 6C 38 3D 06 10 6C 38 3D 07 10 6F 38 3D 08 10 20 38 3D 01
<< 6A 80 Incorrect parameters in the command data field
Download cap failed...
>> cardinfo
>> 80 F2 80 00 02 4F 00 00
<< 08 A0 00 00 00 03 00 00 00 01 9E 90 00
>> 80 F2 40 00 02 4F 00 00
<< 6A 88 Referenced data or reference data not found
>> 80 F2 10 00 02 4F 00 00
<< 6A 88 Referenced data or reference data not found
Card Manager AID : A000000003000000
Card Manager state : OP_READY
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3055
- Contact:
Re: Including new Packages
The log told me that this CAP import one package with AID "A0 00 00 00 09 00 03 FF FF FF FF 89 10 71 00 02"; the package is loaded on the card already?
sense and simplicity
-
- Posts: 20
- Joined: Mon Nov 28, 2016 9:13 am
- Points :90
- Contact:
Re: Including new Packages
UNKNwYSHSA wrote:The log told me that this CAP import one package with AID "A0 00 00 00 09 00 03 FF FF FF FF 89 10 71 00 02"; the package is loaded on the card already?
Hello,
How did you solve the problem of 6A 88 Referenced data or reference data not found?
Please help
Thank you.
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3055
- Contact:
Re: Including new Packages
Load package "A0 00 00 00 09 00 03 FF FF FF FF 89 10 71 00 02" first, and then the command: upload "C:\workspace\helloStk\bin\helloStk\javacard\helloStk.cap" will process succeeded. And the command "80 F2 40 00 02 4F 00 00" and "80 F2 10 00 02 4F 00 00" will not be "6A 88" responsed.
sense and simplicity
-
- Posts: 20
- Joined: Mon Nov 28, 2016 9:13 am
- Points :90
- Contact:
Re: Including new Packages
UNKNwYSHSA wrote:Load package "A0 00 00 00 09 00 03 FF FF FF FF 89 10 71 00 02" first, and then the command: upload "C:\workspace\helloStk\bin\helloStk\javacard\helloStk.cap" will process succeeded. And the command "80 F2 40 00 02 4F 00 00" and "80 F2 10 00 02 4F 00 00" will not be "6A 88" responsed.
Hello,
When I build the project, it is doing so successfully, but when I run the JCWDE, it is giving me an error. I got the sim.jar file from
https://github.com/Shadytel/sim-tools/t ... r/javacard
Exception in thread "main" java.lang.NoClassDefFoundError: sim/toolkit/ToolkitConstants
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.javacard.jcwde.MaskedApplets.getInstallInstance(MaskedApplets.java:307)
at com.sun.javacard.jcwde.MaskedApplets.getAppInstallMethod(MaskedApplets.java:288)
at com.sun.javacard.jcwde.MaskedApplets$TempPkgTableEntry.addToPackageTable(MaskedApplets.java:384)
at com.sun.javacard.jcwde.MaskedApplets.readConfigFile(MaskedApplets.java:110)
at com.sun.javacard.jcwde.Main.<init>(Main.java:64)
at com.sun.javacard.jcwde.Main.main(Main.java:140)
Caused by: java.lang.ClassNotFoundException: sim.toolkit.ToolkitConstants
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 20 more
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3055
- Contact:
Re: Including new Packages
Let me fetch the source code and have a test. Just a moment.
sense and simplicity
-
- Posts: 20
- Joined: Mon Nov 28, 2016 9:13 am
- Points :90
- Contact:
Re: Including new Packages
UNKNwYSHSA wrote:Let me fetch the source code and have a test. Just a moment.
Ok! I will be of a great help. Thanks
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3055
- Contact:
Re: Including new Packages
1 You need to add the sim.jar file to -classpath and export files path to -exportpath:
And build project again.
2 Attention: The JCIDE simulator did not support sim apis, so you can't load your cap to the jcvm simulator.
AID 0xA0:0x0:0x0:0x0:0x9:0x0:0x3:0xFF:0xFF:0xFF:0xFF:0x89:0x10:0x71:0x0:0x2 is the AID of package sim.toolkit;
AID 0xA0:0x0:0x0:0x0:0x9:0x0:0x3:0xFF:0xFF:0xFF:0xFF:0x89:0x10:0x71:0x0:0x1 is the AID of package sim.access;
Both these two package is not implemented by JCIDE simulator.
And build project again.
2 Attention: The JCIDE simulator did not support sim apis, so you can't load your cap to the jcvm simulator.
AID 0xA0:0x0:0x0:0x0:0x9:0x0:0x3:0xFF:0xFF:0xFF:0xFF:0x89:0x10:0x71:0x0:0x2 is the AID of package sim.toolkit;
AID 0xA0:0x0:0x0:0x0:0x9:0x0:0x3:0xFF:0xFF:0xFF:0xFF:0x89:0x10:0x71:0x0:0x1 is the AID of package sim.access;
Both these two package is not implemented by JCIDE simulator.
You do not have the required permissions to view the files attached to this post. Please login first.
sense and simplicity
-
- Posts: 20
- Joined: Mon Nov 28, 2016 9:13 am
- Points :90
- Contact:
Re: Including new Packages
UNKNwYSHSA wrote:1 You need to add the sim.jar file to -classpath and export files path to -exportpath:
And build project again.
2 Attention: The JCIDE simulator did not support sim apis, so you can't load your cap to the jcvm simulator.
AID 0xA0:0x0:0x0:0x0:0x9:0x0:0x3:0xFF:0xFF:0xFF:0xFF:0x89:0x10:0x71:0x0:0x2 is the AID of package sim.toolkit;
AID 0xA0:0x0:0x0:0x0:0x9:0x0:0x3:0xFF:0xFF:0xFF:0xFF:0x89:0x10:0x71:0x0:0x1 is the AID of package sim.access;
Both these two package is not implemented by JCIDE simulator.
I did set the sim.jar and the export files. But when I am trying to load the applet the sim card, I get error 6A 88.
Who is online
Users browsing this forum: No registered users and 64 guests