Skip to content

Commit

Permalink
Add support for the exportmap flag
Browse files Browse the repository at this point in the history
This flag is esp. useful if you want to reimplement an existing package.
E.g. you can use it to implement a missing javacardx.framework.tlv
package.
  • Loading branch information
mwalle authored and martinpaljak committed Mar 2, 2024
1 parent e9a84ad commit bbe0e56
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Details:
* `aid` attribute - AID (hex) of the package. Recommended - or set to the 5 first bytes of the applet AID if left unspecified.
* `output` attribute - path where to save the generated CAP file. Optional, see below for variables.
* `export` attribtue - path (folder) where to place the JAR and generated EXP file. Optional.
* `exportmap` attribtue - if set to true, use pre-defined export file. Optional.
* `jar` attribute - path where to save the generated archive JAR file. Optional.
* `jca` attribute - path where to save the generated JavaCard Assembly (JCA) file. Optional.
* `verify` attribute - if set to false, disables verification of the resulting CAP file with offcardeverifier. Optional.
Expand Down
8 changes: 8 additions & 0 deletions task/src/main/java/pro/javacard/ant/JCCap.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class JCCap extends Task {
private boolean debug = false;
private boolean strip = false;
private boolean ints = false;
private boolean exportmap = false;


public JCCap(String master_jckit_path) {
Expand Down Expand Up @@ -117,6 +118,10 @@ public void setInts(boolean arg) {
ints = arg;
}

public void setExportmap(boolean arg) {
exportmap = arg;
}

public void setTargetsdk(String arg) {
raw_targetsdk = arg;
}
Expand Down Expand Up @@ -510,6 +515,9 @@ private void convert(Path applet_folder, List<Path> exps) {
if (ints) {
j.createArg().setLine("-i");
}
if (exportmap) {
j.createArg().setLine("-exportmap");
}

// determine output types
String outputs = "CAP";
Expand Down

0 comments on commit bbe0e56

Please sign in to comment.