Skip to content

Commit

Permalink
Merge pull request #19 from mrautio/feature/update-dependencies-2023-…
Browse files Browse the repository at this point in the history
…12-04

Update dependencies and use CLA 0x80 (proprietary) class for fuzz commands
  • Loading branch information
mrautio authored Dec 5, 2023
2 parents 7888214 + d223b25 commit a2a1486
Show file tree
Hide file tree
Showing 22 changed files with 609 additions and 625 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ FROM alpine:latest

WORKDIR /tmp

RUN apk add --no-cache bash gcc make pkgconfig openssl-dev rust cargo gradle>6.0.0 openjdk8=8.372.07-r0
RUN apk add --no-cache bash gcc make pkgconfig openssl-dev rust cargo gradle openjdk8

# JDK8 is best supported by different JavaCard versions (<=3.0.4)
# Configure version based on alpine:latest version info: https://pkgs.alpinelinux.org/packages?name=openjdk8&branch=&repo=&arch=&maintainer=
ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk/
ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/bin
ENV JAVA_VERSION 8u372
ENV JAVA_ALPINE_VERSION 8.372.07-r0
ENV JAVA_VERSION 8u392
ENV JAVA_ALPINE_VERSION 8.392.08-r1

COPY oracle_javacard_sdks ./oracle_javacard_sdks
COPY build.gradle gradle.properties ./
Expand Down
12 changes: 6 additions & 6 deletions gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ org.antlr:antlr4-runtime:4.7.2=checkstyle
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
org.checkerframework:checker-qual:2.8.1=checkstyle
org.codehaus.mojo:animal-sniffer-annotations:1.18=checkstyle
org.junit.jupiter:junit-jupiter-api:5.9.1=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:5.9.1=testRuntimeClasspath
org.junit.platform:junit-platform-commons:1.9.1=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:1.9.1=testRuntimeClasspath
org.junit:junit-bom:5.9.1=testCompileClasspath,testRuntimeClasspath
org.opentest4j:opentest4j:1.2.0=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-api:5.10.1=testCompileClasspath,testRuntimeClasspath
org.junit.jupiter:junit-jupiter-engine:5.10.1=testRuntimeClasspath
org.junit.platform:junit-platform-commons:1.10.1=testCompileClasspath,testRuntimeClasspath
org.junit.platform:junit-platform-engine:1.10.1=testRuntimeClasspath
org.junit:junit-bom:5.10.1=testCompileClasspath,testRuntimeClasspath
org.opentest4j:opentest4j:1.3.0=testCompileClasspath,testRuntimeClasspath
empty=annotationProcessor,testAnnotationProcessor
20 changes: 20 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,11 @@
<sha512 value="440d7376673ed8e8ea84ce9f10e089f417c93a4f7044d23443588fbfa96cf74492ab26597fd9955537ce0e3190448062cfeadd428cb0de8522f81ccf3faa6353" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.jupiter" name="junit-jupiter-api" version="5.10.1">
<artifact name="junit-jupiter-api-5.10.1.jar">
<sha512 value="b1fef44d4aa781bb119ab723c3c2a6f0d27efc4493a1fa26b603c7c7a8884c4d6274bccec6536f120d55f876f8d052aaf6cc003074c27cc704deb2c4bc08b6f0" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.jupiter" name="junit-jupiter-api" version="5.7.0">
<artifact name="junit-jupiter-api-5.7.0.jar">
<sha512 value="b5551a908ccca41418ea2502d29840d302e8d64ec9f6ff1aeba316568e6ad357dd33a7973d28d836796cf40be304afc7b362bc5ad7eed1fdb638d43c8969a93b" origin="Generated by Gradle"/>
Expand All @@ -701,6 +706,11 @@
<sha512 value="35c6c38b155b568a1315b6f88e28d1940c69df807f9227fec0b54ad98688ccbd4c6020092d3d7fa889f74a708df82fce3733788bdcbad62eaac0f557e567d708" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.jupiter" name="junit-jupiter-engine" version="5.10.1">
<artifact name="junit-jupiter-engine-5.10.1.jar">
<sha512 value="1fcc9406d1e0301e27538757c9649545d784e83743a8800932971881cfd78a14a264ad13c0b92fad9ae1be50963c540427a19cb2d1fee06888ef48105aad4c8b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.jupiter" name="junit-jupiter-engine" version="5.7.0">
<artifact name="junit-jupiter-engine-5.7.0.jar">
<sha512 value="4e7b36de3296a91639bfdeaecad7dd38eecd5ea5eccbf430a631f7ae5ef6556b33d141d375022bec0a5bcfa665e332f3f11fcd6c8dd513ac39f4b19e5ec2392a" origin="Generated by Gradle"/>
Expand All @@ -726,6 +736,11 @@
<sha512 value="51496111e3d0d1f27c3cee09bbfed9a9eb7d94b7bd12cbb39fddb5e64e6ba77e26cf89a8bd96d85bfe9fd39bd3db1c108aecad8c609e24ea6da3f4945353ca10" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.platform" name="junit-platform-commons" version="1.10.1">
<artifact name="junit-platform-commons-1.10.1.jar">
<sha512 value="4aa83350e7a6df21feb9ba8756bb4a68986f33f8c6e384720d1daa448444016c0def1781729788e3e884664abd6703b1e3c0ec6b79893a9d5645c3a4809c0ad2" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.platform" name="junit-platform-commons" version="1.7.0">
<artifact name="junit-platform-commons-1.7.0.jar">
<sha512 value="29c4d465590b178848f4604297a5ad287005db61b4a4f48c53510e8ddfebc9437790b4715c48f800a26d93c722e9f1d5ac38445ee80787f5aa2b386690544749" origin="Generated by Gradle"/>
Expand All @@ -751,6 +766,11 @@
<sha512 value="499e25e1920d73fea8f4e21a45ca0f3fc44561aa2589882bc29bb9bf212566b84ea704ea32ae5266da344c25b07dc23c3201587caf72508da2383b6f0848573b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.platform" name="junit-platform-engine" version="1.10.1">
<artifact name="junit-platform-engine-1.10.1.jar">
<sha512 value="52ea2f11ec2ef0457384335d1b09263f4efecf63d9df99c5f8396f74d972722c51f8f766370e85e030f4476e805dac72603296942593c5bbe56993454b9d8e30" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit.platform" name="junit-platform-engine" version="1.7.0">
<artifact name="junit-platform-engine-1.7.0.jar">
<sha512 value="f60f7f76beb969eb613f61c2477fa934168d79985b447b0605e07722c61a95dbd0212b9a30f9e876653ef39f5d3b097d4585340a3d9714e56d56bc03c1690a1b" origin="Generated by Gradle"/>
Expand Down
14 changes: 7 additions & 7 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
"homepage": "https://github.com/nmattia/niv",
"owner": "nmattia",
"repo": "niv",
"rev": "914aba08a26cb10538b84d00d6cfb01c9776d80c",
"sha256": "0gx316gc7prjay5b0cr13x4zc2pdbiwxkfkpjvrlb2rml80lm4pm",
"rev": "6bd7cd686220bf3db0e212481faf9578e8c8ff0f",
"sha256": "15claxlj6y15db67qc7kb4vzyn6sv7r13z4q502vq7a4z2488z94",
"type": "tarball",
"url": "https://github.com/nmattia/niv/archive/914aba08a26cb10538b84d00d6cfb01c9776d80c.tar.gz",
"url": "https://github.com/nmattia/niv/archive/6bd7cd686220bf3db0e212481faf9578e8c8ff0f.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
"branch": "nixos-23.05",
"branch": "nixos-23.11",
"description": "Nix Packages collection",
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9fdfaeb7b96f05e869f838c73cde8d98c640c649",
"sha256": "1dkpyv0cgbcrmfajbmsdfqlss6nsgs3bj3adfhvcf39pvz9f5p7g",
"rev": "933d7dc155096e7575d207be6fb7792bc9f34f6d",
"sha256": "1gcqpm7v42wfmq0wrl4dym9kg4y7n4f5wsgvisq52zr90vjvylwx",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/9fdfaeb7b96f05e869f838c73cde8d98c640c649.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/933d7dc155096e7575d207be6fb7792bc9f34f6d.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
2 changes: 1 addition & 1 deletion src/main/java/emvcardsimulator/ApduLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void addLogEntry(byte[] src, short srcOffset, byte length) {
return;
}

if (src[srcOffset] == (byte) 0xE0) {
if (src[srcOffset] == (byte) 0x80) {
// do not log internal commands
return;
}
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/emvcardsimulator/EmvApplet.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ static void printEmvTags() {
}
*/

protected static final short CMD_SET_SETTINGS = (short) 0xE000;
protected static final short CMD_SET_EMV_TAG = (short) 0xE001;
protected static final short CMD_SET_EMV_TAG_FUZZ = (short) 0xE011;
protected static final short CMD_SET_TAG_TEMPLATE = (short) 0xE002;
protected static final short CMD_SET_READ_RECORD_TEMPLATE = (short) 0xE003;
protected static final short CMD_FACTORY_RESET = (short) 0xE005;
protected static final short CMD_LOG_CONSUME = (short) 0xE006;
protected static final short CMD_FUZZ_RESET = (short) 0xE007;
protected static final short CMD_SET_SETTINGS = (short) 0x8000;
protected static final short CMD_SET_EMV_TAG = (short) 0x8001;
protected static final short CMD_SET_EMV_TAG_FUZZ = (short) 0x8011;
protected static final short CMD_SET_TAG_TEMPLATE = (short) 0x8002;
protected static final short CMD_SET_READ_RECORD_TEMPLATE = (short) 0x8003;
protected static final short CMD_FACTORY_RESET = (short) 0x8005;
protected static final short CMD_LOG_CONSUME = (short) 0x8006;
protected static final short CMD_FUZZ_RESET = (short) 0x8007;
protected static final short CMD_SELECT = (short) 0x00A4;
protected static final short CMD_READ_RECORD = (short) 0x00B2;
protected static final short CMD_DDA = (short) 0x0088;
Expand Down
Loading

0 comments on commit a2a1486

Please sign in to comment.