martinpaljak / GlobalPlatformPro

🌐 🔐 Manage applets and keys on JavaCard-s like a pro (via command line or from your Java project)
https://javacard.pro/globalplatform
GNU Lesser General Public License v3.0
679 stars 210 forks source link

ACR support removed? #279

Open z3ntu opened 2 years ago

z3ntu commented 2 years ago

Hi, I've noticed that in recent versions the ACR support was removed, gp -acr-add, gp -acr-delete, gp -acr-list-aram and friends. I've found commit https://github.com/martinpaljak/GlobalPlatformPro/commit/e41c8e9e54eb59ae190ea0525228e865b10f017d but the repository linked there (https://github.com/martinpaljak/seac) doesn't exist.

ACR support from v20.04.14 works pretty well, just -acr-delete needs a small fix to work

diff --git a/tool/src/main/java/pro/javacard/gp/GPTool.java b/tool/src/main/java/pro/javacard/gp/GPTool.java
index 68fea41..c06969b 100644
--- a/tool/src/main/java/pro/javacard/gp/GPTool.java
+++ b/tool/src/main/java/pro/javacard/gp/GPTool.java
@@ -564,7 +564,7 @@ public final class GPTool extends GPCommandLineInterface {

                     AID aid = null;
                     if (args.has(OPT_APPLET)) {
-                        aid = AID.fromString(OPT_APPLET);
+                        aid = AID.fromString(args.valueOf(OPT_APPLET));
                     }

                     byte[] hash = null;
z3ntu commented 1 year ago

Also linking my branch that adds PERM_AR_DO support, not super pretty commits as I doubt there's any chance this can get merged, given that ACR support has been removed here.