Reputation: 1319
How can I deploy an extended Java-Card-applet to my card? Until now I've only dealt with classic applets and installed them with GlobalPlatformPro under OS X.
However, when I try to install an extended applet (using gp -install KCIdentity.eap
) it fails with the following message:
Exception in thread "main" java.lang.RuntimeException: Could not figure out the package name of the applet!
at pro.javacard.gp.CapFile.<init>(CapFile.java:94)
at pro.javacard.gp.CapFile.<init>(CapFile.java:65)
at pro.javacard.gp.GPTool.main(GPTool.java:441)
Does anyone know how I can deploy my applet to my card (ideally using OS X, but Debian or Windows is also OK)?
Edit: Link to GlobalPlatformPro: https://github.com/martinpaljak/GlobalPlatformPro
Update: This has nothing to do with extended APDUs but with the Java-VM-version. Classic applets use version 2.x whereas extended applets use version 3.y. NetBeans packages the extended applets in an *.eap-file which doesn't seem to be supported... However I'll look if I can package it in an *.cap-file. Renaming didn't work...
Upvotes: 0
Views: 444
Reputation: 2647
I guess with "extended applet" you are refering to an applet that Extended Length APDUs. To use extended length APDUs the Applet
must implement the ExtendedLength
interface fomr the standard javacard package. Otherwise the applet will return with 0x6700
to extended Length APDUs.
However, GP says that the package name could not be determined, so I suppose you did not properly convert/compile the CAP file. Therefore you should review your compilation process.
I suppose the .eap
is a typo? Otherwise change that to .cap
, which is the standard format for downloading applets to the card.
edit: answer in the comments.
edit: the reason turned out to be that the card does not support the connected edition. Javacard3 is divided into classic edition(basically an update on the Javacard 2.2.2 API) and the connected edition(new mechanisms like Webserver applets etc...).
Upvotes: 1