简体   繁体   中英

Why all applets of a package are not installed? And why I can't delete them?

This is contents of my JavaCard :

GP::: gp -list
AID: A000000151000000 (|....Q...|)
     ISD OP_READY: Security Domain, Card lock, Card terminate, Default selected,
 CVM (PIN) management

AID: A0000001515350 (|....QSP|)
     ExM LOADED: (none)
     A000000151535041 (|....QSPA|)

In Eclipse I add 3 applets to a single package as below :

  • Pack AID = 01020304050607080900

    • App1 AID = 0102030405060708090000
    • App2 AID = 0102030405060708090001
    • App3 AID = 0102030405060708090002

Step1:

I converted this package to a .cap file and installed it successfully on my card using JCManager .

When I list the applets using gp , it returns :

GP::: gp -list
AID: A000000151000000 (|....Q...|)
     ISD OP_READY: Security Domain, Card lock, Card terminate, Default selected,
 CVM (PIN) management

AID: 0102030405060708090002 (|...........|)
     App SELECTABLE: (none)

AID: A0000001515350 (|....QSP|)
     ExM LOADED: (none)
     A000000151535041 (|....QSPA|)

AID: 01020304050607080900 (|..........|)
     ExM LOADED: (none)
     0102030405060708090002 (|...........|)
     0102030405060708090001 (|...........|)
     0102030405060708090000 (|...........|)

Step2:

I want to delete App1 and App2 :

GP::: gp -delete 0102030405060708090000
Could not delete AID (not present on card): 0102030405060708090000

GP::: gp -delete 0102030405060708090000 -deletedeps
Could not delete AID (not present on card): 0102030405060708090000

GP::: gp -delete 0102030405060708090001
Could not delete AID (not present on card): 0102030405060708090001

GP::: gp -delete 0102030405060708090001 -deletedeps
Could not delete AID (not present on card): 0102030405060708090001

But for App3 I have a different output :

GP::: gp -delete 0102030405060708090002 -deletedeps
Could not delete AID: 0102030405060708090002
openkms.gp.GPException: Deletion failed SW: 6A88
        at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:924)
        at openkms.gp.GlobalPlatform.deleteAID(GlobalPlatform.java:739)
        at openkms.gp.GPTool.main(GPTool.java:291)

Note that I can delete App3 without parameter -deletedeps successfully :

GP::: gp -delete 0102030405060708090002   

GP::: 

And when I want to delete the package, I must add deletedeps :

GP::: gp -delete 01020304050607080900
Could not delete AID: 01020304050607080900
TIP: Maybe try with --deletedeps
openkms.gp.GPException: Deletion failed SW: 6985
        at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:924)
        at openkms.gp.GlobalPlatform.deleteAID(GlobalPlatform.java:739)
        at openkms.gp.GPTool.main(GPTool.java:291)

GP::: gp -delete 01020304050607080900 -deletedeps

GP:::

Question of Step1 :

Q1: Why there is not AID of APP1 and APP2 as an applet like APP3 in the output? (In the other word why I see APP1 and APP2 AIDs in subset of the Package, But I can the as a Applet installed on the card?) Are they installed or not?

Question of Step2 :

Q2: Why I can't delete App1 and App2?

Q3: What is the meaning of the error[ 6A88 ] in deleting App3 with parameter -deletedeps ? Why I receive it?

Q4: When I must use deletedeps and when I don't?

You have a single applet installed :

AID: 0102030405060708090002 (|...........|) App SELECTABLE: (none)

And you have a package with 3 applets loaded :

AID: 01020304050607080900 (|..........|) ExM LOADED: (none) 0102030405060708090002 (|...........|) 0102030405060708090001 (|...........|) 0102030405060708090000 (|...........|)

You can only delete one existing applet 0102030405060708090002 and you can't delete the package 01020304050607080900 without either deleting the active instance 0102030405060708090002 first or by using -deletedeps which also deletes the installed applet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM