arekinath / PivApplet

PIV applet for JavaCard 2.2.2 and 3.0.4+ with full ECDSA/ECDH support
111 stars 37 forks source link

Not able to build the .cap file for PiVApplet #76

Open MahaboobAslam opened 10 months ago

MahaboobAslam commented 10 months ago

Hi

I have downloaded the JCARDSDK 2.2.2 and source code from the frankmorgner/PivApplet i.e., the Forked version of Arekinath/PivApplet.

using JDK 1.8 version i am able to build the .class files for the .java files. But when it tried to build the .cap file using the .class files i am not able to build the .cap file from the .class file generated from the source code of frankmorgner/PivApplet.

Command to build CAP :

"converter -out PivApplet.cap 0xa0:0x00:0x00:0x03:0x08:0x00:0x00:0x10:0x00:0x01:0x00 1.0 -exportpath C:\PivApplet-build\PivApplet\src\net\cooperi\pivapplet "

Note: to run the above command i have opened the command prompt from the bin folder which has got the converter.bat file.

When I run this command, i get the below error as follows: Error Message:

Java Card 2.2.2 Class File Converter, Version 1.3 Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. error: PivApplet.cap: empty package. conversion completed with 1 errors and 0 warnings.

With the .cfg file in the Test folder, i tried to launch the JSimCard i am getting the exception as follows

java -cp jcardsim-2.2.2-all.jar com.licel.jcardsim.remote.BixVReaderCard jcardsim.cfg

Exception: Exception in thread "main" javacard.framework.SystemException at javacard.framework.SystemException.throwIt(SystemException.java:87) at com.licel.jcardsim.base.Simulator.loadApplet(Simulator.java:113) at com.licel.jcardsim.base.Simulator.(Simulator.java:80) at com.licel.jcardsim.remote.BixVReaderCard.(BixVReaderCard.java:35) at com.licel.jcardsim.remote.BixVReaderCard.main(BixVReaderCard.java:73)

Can any please let me know what is going wrong in detail and give me details steps how to resolve the issues. And let me know how to create a .cap file and load or launch the JSimCard of PivApplet.

Regards Aslam