diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index ac184013..346d645f 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/library/pom.xml b/library/pom.xml index f1376851..acede5fe 100644 --- a/library/pom.xml +++ b/library/pom.xml @@ -24,7 +24,7 @@ com.github.martinpaljak capfile - 23.08.29 + 24.03.15 diff --git a/library/src/main/java/pro/javacard/gp/GPCommands.java b/library/src/main/java/pro/javacard/gp/GPCommands.java index b657ab5d..8992b65a 100644 --- a/library/src/main/java/pro/javacard/gp/GPCommands.java +++ b/library/src/main/java/pro/javacard/gp/GPCommands.java @@ -37,7 +37,9 @@ // Middle layer between GPTool (CLI) and GlobalPlatform (session) public class GPCommands { - private GPCommands() {} + private GPCommands() { + } + private static void storeDGI(GPSession gp, byte[] payload) throws GPException, IOException { // Single DGI. 0x90 should work as well but 0x80 is actually respected by cards. CommandAPDU cmd = new CommandAPDU(GPSession.CLA_GP, GPSession.INS_STORE_DATA, 0x80, 0x00, payload); @@ -135,12 +137,14 @@ public static void load(GPSession gp, CAPFile cap, AID to, AID dapAID, LFDBH has final byte[] dap; if (dapRequired) { + if (1 == 1) throw new IllegalArgumentException("Broken code, see #304"); + // FIXME: see #304 switch (lfdbh) { case SHA1: - dap = cap.getMetaInfEntry(CAPFile.DAP_RSA_V1_SHA1_FILE); + dap = new byte[128]; //cap.getMetaInfEntry(CAPFile.DAP_RSA_V1_SHA1_FILE); break; case SHA256: - dap = cap.getMetaInfEntry(CAPFile.DAP_RSA_V1_SHA256_FILE); + dap = new byte[128]; // cap.getMetaInfEntry(CAPFile.DAP_RSA_V1_SHA256_FILE); break; default: throw new IllegalArgumentException("Unsupported DAP hash algorithm: " + hash); diff --git a/pom.xml b/pom.xml index 5a8dccbc..8d55901c 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.github.martinpaljak metacard - 23.09.14 + 24.03.29 23.08.10-SNAPSHOT gppro diff --git a/spotbugs.xml b/spotbugs.xml index 5259f8fb..8ce0e255 100644 --- a/spotbugs.xml +++ b/spotbugs.xml @@ -7,6 +7,9 @@ + + + diff --git a/tool/pom.xml b/tool/pom.xml index 89636fa6..fc902720 100644 --- a/tool/pom.xml +++ b/tool/pom.xml @@ -55,9 +55,67 @@ com.fasterxml.jackson.dataformat jackson-dataformat-cbor - 2.15.2 + 2.17.0 + + + + exe + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + + com.akathist.maven.plugins.launch4j + launch4j-maven-plugin + + + gp-exe + package + + launch4j + + + console + target/gp.exe + target/gp.jar + GlobalPlatformPro + + pro.javacard.gptool.GPTool + + + ./ + 11 + + + + ${windowsVersion.majorVersion}.${windowsVersion.minorVersion}.${windowsVersion.incrementalVersion}.${windowsVersion.buildNumber} + + ${project.version} + GlobalPlatformPro + (C) 2015 - 2023 Martin Paljak and contributors (LGPL+MIT) + + ${windowsVersion.majorVersion}.${windowsVersion.minorVersion}.${windowsVersion.incrementalVersion}.${windowsVersion.buildNumber} + + ${project.version} + GlobalPlatformPro + gppro + gp.exe + + + + + + + + + + @@ -102,53 +160,6 @@ - - - org.codehaus.mojo - build-helper-maven-plugin - - - - com.akathist.maven.plugins.launch4j - launch4j-maven-plugin - - - gp-exe - package - - launch4j - - - console - target/gp.exe - target/gp.jar - GlobalPlatformPro - - pro.javacard.gptool.GPTool - - - ./ - 11 - - - - ${windowsVersion.majorVersion}.${windowsVersion.minorVersion}.${windowsVersion.incrementalVersion}.${windowsVersion.buildNumber} - - ${project.version} - GlobalPlatformPro - (C) 2015 - 2023 Martin Paljak and contributors (LGPL+MIT) - - ${windowsVersion.majorVersion}.${windowsVersion.minorVersion}.${windowsVersion.incrementalVersion}.${windowsVersion.buildNumber} - - ${project.version} - GlobalPlatformPro - gppro - gp.exe - - - - - io.github.zlika