gpt4 book ai didi

javacard - 为什么我不能从我的 JavaCard 中删除未使用的包?

转载 作者:行者123 更新时间:2023-12-04 21:03:26 26 4
gpt4 key购买 nike

我有一张 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)

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

最佳答案

回答

您如何确定这些软件包未被使用? applet 可以设计为使用单独的库和/或服务。这些库/服务在 GP 中有自己的 AID,但您首先需要删除所有小程序实例和小程序模块(按此顺序),然​​后才能删除它们。

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

AID 和 RID 的解释

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

现在我已经获得了一份 RID 列表:

  • A000000018434D00 安全域来自 Gemplus(现为 Gemalto);
  • A0000000620001, A0000000620002, A0000000620003, A0000000620101, A000000062010101, >A0000000620102A0000000620201都是Sun(现在是Oracle)的模块;他们 contain extensions to the basic Java Card runtime ;
  • A0000000030000是旧VISA RID下的卡管家;
  • A000000018100201A000000018100101 是来自 Gemalto 的扩展模块或小程序;
  • A00000015100是Global Platform AID下的卡片管理员;

A0000000030000 AID 正在逐步淘汰 - VISA 是开放平台(现为全局平台)的创始人。 GP 现在应该使用他们自己的 RID。

注意事项:

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

关于javacard - 为什么我不能从我的 JavaCard 中删除未使用的包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34824731/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com