From 6df13c7a04c020cbe64e9fb2edebeba2e6db084a Mon Sep 17 00:00:00 2001 From: Christoph Honal Date: Sun, 10 Dec 2023 17:04:01 +0100 Subject: [PATCH] update scripts --- .vscode/jcardsim_totp.cfg | 5 +++++ .vscode/launch.json | 33 ++++++++++++++++++++++++++++++++- .vscode/settings.json | 16 +++++++++++++++- .vscode/tasks.json | 30 +++++++++++++++++++++++++++++- applets/FIDO2Applet | 2 +- applets/apex-totp | 2 +- scripts/clean/apex-spark.sh | 4 ++++ scripts/compile/FIDO2Applet.sh | 2 +- scripts/compile/apex-spark.sh | 6 ++++++ 9 files changed, 94 insertions(+), 6 deletions(-) create mode 100644 .vscode/jcardsim_totp.cfg create mode 100755 scripts/clean/apex-spark.sh create mode 100755 scripts/compile/apex-spark.sh diff --git a/.vscode/jcardsim_totp.cfg b/.vscode/jcardsim_totp.cfg new file mode 100644 index 0000000..730884d --- /dev/null +++ b/.vscode/jcardsim_totp.cfg @@ -0,0 +1,5 @@ +com.licel.jcardsim.card.applet.0.AID=A0000005272101014150455801 +com.licel.jcardsim.card.applet.0.Class=com.vivokey.otp.YkneoOath +com.licel.jcardsim.card.ATR=3B8D80010031C173C8400052A51000900070 +com.licel.jcardsim.vsmartcard.host=localhost +com.licel.jcardsim.vsmartcard.port=35963 \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index 7d7fc1d..85e80e9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -29,7 +29,7 @@ "projectName": "fido2applet", "args": [ "${workspaceFolder}/.vscode/jcardsim_fido2.1.cfg", - "<", "${workspaceFolder}/cpipe" + // "<", "${workspaceFolder}/cpipe" ], "classPaths": [ "${workspaceFolder}/smartcard-ci/jcardsim/target/jcardsim-3.0.5-SNAPSHOT.jar", @@ -84,6 +84,37 @@ ], "console": "integratedTerminal", "preLaunchTask": "Compile Spark" + }, + { + "type": "java", + "name": "Jcardsim TOTP", + "request": "launch", + "mainClass": "com.licel.jcardsim.remote.VSmartCard", + "projectName": "totp", + "args": [ + "${workspaceFolder}/.vscode/jcardsim_totp.cfg" + ], + "classPaths": [ + "${workspaceFolder}/smartcard-ci/jcardsim/target/jcardsim-3.0.5-SNAPSHOT.jar", + "${workspaceFolder}/applets/apex-totp/target" + ], + "console": "integratedTerminal", + "preLaunchTask": "Compile TOTP", + "stepFilters": { + "classNameFilters": [ + "java.*", + "javax.*", + "com.sun.*", + "sun.*", + "sunw.*", + "org.omg.*", + "com.licel.jcardsim.*", + "com.licel.jcardsim.base.*" + ], + "skipSynthetics": false, + "skipStaticInitializers": false, + "skipConstructors": false + } } ] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 102eb18..844d3c8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,11 +14,25 @@ "!**/applets/apex-ndef/**", "!**/applets/apex-spark", "!**/applets/apex-spark/**", + "!**/applets/apex-totp", + "!**/applets/apex-totp/**", "!**/smartcard-ci/jcardsim", "!**/smartcard-ci/jcardsim/**" ], + "java.debug.settings.exceptionBreakpoint.skipClasses": [ + "$JDK", + "$Libraries", + "com.licel.jcardsim.*", + "com.licel.jcardsim.base.*" + ], + "java.debug.settings.stepping.skipClasses": [ + "$JDK", + "$Libraries", + "com.licel.jcardsim.*", + "com.licel.jcardsim.base.*" + ], "java.debug.settings.onBuildFailureProceed": true, "java.format.settings.url": "eclipse-formatter.xml", - "java.debug.settings.showHex": false, + "java.debug.settings.showHex": true, "java.configuration.updateBuildConfiguration": "interactive" } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 94e9aba..b67831b 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -63,7 +63,7 @@ }, "group": { "kind": "build", - "isDefault": true + "isDefault": false }, "problemMatcher": [] }, @@ -83,6 +83,22 @@ }, "problemMatcher": [] }, + { + "label": "Compile TOTP", + "type": "shell", + "command": "JAVA_HOME=$JAVA_HOME_JDK8 ant", + "options": { + "cwd": "${workspaceFolder}/applets/apex-totp", + "env": { + "JC_HOME": "${workspaceFolder}/applets/apex-totp/oracle_javacard_sdks/jc304_kit" + } + }, + "group": { + "kind": "build", + "isDefault": false + }, + "problemMatcher": [] + }, { "label": "Clean FIDO2", "type": "shell", @@ -126,6 +142,12 @@ "command": "rm -rf ${workspaceFolder}/applets/apex-spark/target", "problemMatcher": [] }, + { + "label": "Clean TOTP", + "type": "shell", + "command": "rm -rf ${workspaceFolder}/applets/apex-totp/target", + "problemMatcher": [] + }, { "label": "Document NDEF", "type": "shell", @@ -196,6 +218,12 @@ "type": "shell", "command": "${workspaceFolder}/.vscode/setup_ndef.sh", "problemMatcher": [], + }, + { + "label": "Setup TOTP", + "type": "shell", + "command": "${workspaceFolder}/.vscode/setup_totp.sh", + "problemMatcher": [], } ] } \ No newline at end of file diff --git a/applets/FIDO2Applet b/applets/FIDO2Applet index 30c3e0e..adc3226 160000 --- a/applets/FIDO2Applet +++ b/applets/FIDO2Applet @@ -1 +1 @@ -Subproject commit 30c3e0e6d1c7ed0f19e53d9ded6803a11dc906f7 +Subproject commit adc32267f7a1c8548b3df6557f0d4182fc5e76bb diff --git a/applets/apex-totp b/applets/apex-totp index ac7cf55..ad05bb3 160000 --- a/applets/apex-totp +++ b/applets/apex-totp @@ -1 +1 @@ -Subproject commit ac7cf559cf29833221ff390b8db21e152a7aba92 +Subproject commit ad05bb35e1b70ae5470263cc609a4de454e1c3b5 diff --git a/scripts/clean/apex-spark.sh b/scripts/clean/apex-spark.sh new file mode 100755 index 0000000..bd4ed9d --- /dev/null +++ b/scripts/clean/apex-spark.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cd /app/src/applets/apex-spark +rm -rf target diff --git a/scripts/compile/FIDO2Applet.sh b/scripts/compile/FIDO2Applet.sh index 8eca678..fe050a4 100755 --- a/scripts/compile/FIDO2Applet.sh +++ b/scripts/compile/FIDO2Applet.sh @@ -2,5 +2,5 @@ mkdir -p /app/src/bin cd /app/src/applets/FIDO2Applet -JC_HOME=/app/sdks/jc304_kit ./gradlew -PPackageID='A0:00:00:06:47:2F:00:01' -PApplicationID='A0:00:00:06:47:2F:00:01:01' buildJavaCard classes +JC_HOME=/app/sdks/jc304_kit ./gradlew -PPackageID=A0000006472F0001 -PApplicationID=A0000006472F000101 buildJavaCard classes cp /app/src/applets/FIDO2Applet/build/javacard/*.cap /app/src/bin/ diff --git a/scripts/compile/apex-spark.sh b/scripts/compile/apex-spark.sh new file mode 100755 index 0000000..71eac44 --- /dev/null +++ b/scripts/compile/apex-spark.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +mkdir -p /app/src/bin /app/src/applets/apex-spark/target +cd /app/src/applets/apex-spark +JC_HOME=/app/sdks/jc305u3_kit ant +cp /app/src/applets/apex-spark/target/*.cap /app/src/bin/