2

我有一个Gemalto Top DL v2 java 卡。当我list查看内容时,卡中加载了很多包:

GlobalPlatformPro:> gp -visa2 -key 47454D5850524553534F53414D504C45 -list
AID: A000000018434D00 (|.....CM.|)
     ISD OP_READY: Security Domain, Card lock, Card terminate, Default selected, CVM (PIN) management

AID: A0000000620001 (|....b..|)
     ExM LOADED: (none)

AID: A0000000620002 (|....b..|)
     ExM LOADED: (none)

AID: A0000000620003 (|....b..|)
     ExM LOADED: (none)

AID: A0000000620101 (|....b..|)
     ExM LOADED: (none)

AID: A000000062010101 (|....b...|)
     ExM LOADED: (none)

AID: A0000000620102 (|....b..|)
     ExM LOADED: (none)

AID: A0000000620201 (|....b..|)
     ExM LOADED: (none)

AID: A0000000030000 (|.......|)
     ExM LOADED: (none)

AID: A000000018100201 (|........|)
     ExM LOADED: (none)

AID: A000000018100101 (|........|)
     ExM LOADED: (none)
     A000000018534441 (|.....SDA|)

AID: A00000015100 (|....Q.|)
     ExM LOADED: (none)

现在,我想删除未使用的包:

GlobalPlatformPro:> gp -visa2 -key 47454D5850524553534F53414D504C45 -delete A0000000620001 -deletedeps
Could not delete AID: A0000000620001
TIP: Maybe try with --deletedeps
openkms.gp.GPException: Deletion failed SW: 6985
        at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:1039)
        at openkms.gp.GlobalPlatform.deleteAID(GlobalPlatform.java:814)
        at openkms.gp.GPTool.main(GPTool.java:367)

GlobalPlatformPro:> gp -visa2 -key 47454D5850524553534F53414D504C45 -delete A0000000620002 -deletedeps
Could not delete AID: A0000000620002
TIP: Maybe try with --deletedeps
openkms.gp.GPException: Deletion failed SW: 6985
        at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:1039)
        at openkms.gp.GlobalPlatform.deleteAID(GlobalPlatform.java:814)
        at openkms.gp.GPTool.main(GPTool.java:367)

GlobalPlatformPro:> gp -visa2 -key 47454D5850524553534F53414D504C45 -delete A0000000620003 -deletedeps
Could not delete AID: A0000000620003
TIP: Maybe try with --deletedeps
openkms.gp.GPException: Deletion failed SW: 6985
        at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:1039)
        at openkms.gp.GlobalPlatform.deleteAID(GlobalPlatform.java:814)
        at openkms.gp.GPTool.main(GPTool.java:367)

GlobalPlatformPro:> gp -visa2 -key 47454D5850524553534F53414D504C45 -delete A0000000620101 -deletedeps
Could not delete AID: A0000000620101
TIP: Maybe try with --deletedeps
openkms.gp.GPException: Deletion failed SW: 6985
        at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:1039)
        at openkms.gp.GlobalPlatform.deleteAID(GlobalPlatform.java:814)
        at openkms.gp.GPTool.main(GPTool.java:367)

GlobalPlatformPro:> gp -visa2 -key 47454D5850524553534F53414D504C45 -delete A000000062010101 -deletedeps
Could not delete AID: A000000062010101
TIP: Maybe try with --deletedeps
openkms.gp.GPException: Deletion failed SW: 6985
        at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:1039)
        at openkms.gp.GlobalPlatform.deleteAID(GlobalPlatform.java:814)
        at openkms.gp.GPTool.main(GPTool.java:367)

GlobalPlatformPro:> gp -visa2 -key 47454D5850524553534F53414D504C45 -delete A0000000620102 -deletedeps
Could not delete AID: A0000000620102
TIP: Maybe try with --deletedeps
openkms.gp.GPException: Deletion failed SW: 6985
        at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:1039)
        at openkms.gp.GlobalPlatform.deleteAID(GlobalPlatform.java:814)
        at openkms.gp.GPTool.main(GPTool.java:367)

GlobalPlatformPro:> gp -visa2 -key 47454D5850524553534F53414D504C45 -delete  A0000000620201 -deletedeps
Could not delete AID: A0000000620201
TIP: Maybe try with --deletedeps
openkms.gp.GPException: Deletion failed SW: 6985
        at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:1039)
        at openkms.gp.GlobalPlatform.deleteAID(GlobalPlatform.java:814)
        at openkms.gp.GPTool.main(GPTool.java:367)

GlobalPlatformPro:> gp -visa2 -key 47454D5850524553534F53414D504C45 -delete  A0000000030000 -deletedeps
Could not delete AID: A0000000030000
TIP: Maybe try with --deletedeps
openkms.gp.GPException: Deletion failed SW: 6985
        at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:1039)
        at openkms.gp.GlobalPlatform.deleteAID(GlobalPlatform.java:814)
        at openkms.gp.GPTool.main(GPTool.java:367)

GlobalPlatformPro:> gp -visa2 -key 47454D5850524553534F53414D504C45 -delete  A000000018100201 -deletedeps
Could not delete AID: A000000018100201
TIP: Maybe try with --deletedeps
openkms.gp.GPException: Deletion failed SW: 6985
        at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:1039)
        at openkms.gp.GlobalPlatform.deleteAID(GlobalPlatform.java:814)
        at openkms.gp.GPTool.main(GPTool.java:367)

GlobalPlatformPro:> gp -visa2 -key 47454D5850524553534F53414D504C45 -delete  A000000018100101 -deletedeps
Could not delete AID: A000000018100101
TIP: Maybe try with --deletedeps
openkms.gp.GPException: Deletion failed SW: 6985
        at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:1039)
        at openkms.gp.GlobalPlatform.deleteAID(GlobalPlatform.java:814)
        at openkms.gp.GPTool.main(GPTool.java:367)

GlobalPlatformPro:> gp -visa2 -key 47454D5850524553534F53414D504C45 -delete  A00000015100 -deletedeps
Could not delete AID: A00000015100
TIP: Maybe try with --deletedeps
openkms.gp.GPException: Deletion failed SW: 6985
        at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:1039)
        at openkms.gp.GlobalPlatform.deleteAID(GlobalPlatform.java:814)
        at openkms.gp.GPTool.main(GPTool.java:367)

问题是为什么我不能删除它们并释放我的卡的内存?

4

1 回答 1

6

回答

你怎么确定这些包没有被使用?小程序可以设计为使用单独的库和/或服务。这些库/服务在 GP 中有自己的 AID,但您首先需要删除所有小程序实例和小程序模块 - 按此顺序 - 才能删除它们。

很多卡都在 ROM 中预装了软件。ROM 掩码中的空间不能用于其他任何用途。删除这些模块不会释放很多资源。如果删除成功,您基本上只会从注册表中删除 AID。如果您想上传同一库的新版本,这可能很有用,但否则不会有太大的不同。

AID 和 RID 的解释

AID 由两部分组成:一个 5 字节的 RID 和一个可变大小的扩展 - 称为 PIX - 到标识实体的 RID。此实体仅在应用程序 DF 中,但对于 Java Card 模块也由 AID 标识。

现在我已经获得了 RID 的列表,所以:

  • A000000018434D00安全域来自 Gemplus(现为金雅拓);
  • A0000000620001, A0000000620002, A0000000620003, A0000000620101, A000000062010101, A0000000620102,A0000000620201都是 Sun(现在的 Oracle)模块;它们包含对基本 Java Card 运行时的扩展
  • A0000000030000是旧VISA RID下的卡管理器;
  • A000000018100201,A000000018100101是金雅拓的扩展模块或小程序;
  • A00000015100是全球平台AID下的卡管家;

A0000000030000AID 正在逐步淘汰 - VISA 是 Open Platform 的创始人,现在是 Global Platform 。GP 现在应该使用自己的 RID。

笔记:

  • 库只是代码和常量,服务包含可以通过对象共享机制使用的状态;
  • 很明显:对于特定卡,您可能需要联系您的供应商以了解其配置方式。
于 2016-01-16T16:56:42.213 回答