JavaCard Cannot Delete Application - return 6985 (CONDITIONS_NOT_SATISFIED)

I am trying to delete a java card application and delete return 6985, what's wrong? The same code works with other card...

SELECT CARD MANAGER
   -> [00 A4 04 00 00]
   <- [6F 10 84 08 A0 00 00 01 51 00 00 00 A5 04 9F 65 01 FF 90 00] 
   Tag 6F: File Control Information (FCI) Template: 
8408A000000151000000A5049F6501FF
      Tag 84: Executable Module AID: A000000151000000
      Tag A5: File Control Information (FCI) Proprietary Template: 9F6501FF
         Tag 9F65: Unknown: FF

INITIALIZE UPDATE
   -> [80 50 00 00 08 37 80 A7 1F 74 AA 5F 3A 00]
   <- [00 00 00 00 00 00 00 00 00 00 FF 02 00 13 88 4A B6 A8 4A 18 71 29 04     
7E E3 B4 5E DC 90 00] 
   Key diversification data: 00000000000000000000
   Key information: FF02
   Card challenge: 0013884AB6A84A18
   Card cryptogram: 7129047EE3B45EDC

EXTERNAL AUTHENTICATE
   -> [84 82 01 00 10 3A 10 F0 30 A2 F2 E4 64 1D 7B 7E E0 FA 68 A2 1E 00]
   <- [90 00] 

DELETE
   -> [84 E4 00 80 11 4F 07 A0 00 00 00 03 10 10 03 0D 24 5B A7 4B E2 B5 00]
   P2:
      Delete object and related object
   Tag 4F: AID: A0000000031010
   <- [69 85] CONDITIONS_NOT_SATISFIED

Upvotes: 0

Views: 259

Answers (1)

Maarten Bodewes
Maarten Bodewes

Reputation: 94038

You seem to try to delete a VISA application as the RID part of the AID reads A000000003. Furthermore, it says: and related objects which leads me to believe that you also try to delete the module (i.e. the load package, the code). This package could be in ROM, which means it may not be eligible for removal.

Even if you would be able to delete it you would probably not free up any memory as ROM is, well, ROM; you would just remove any reference to it. It may also be that this is simply not an application that you are allowed to remove.

You may have more luck with other AID's or modules that are in EEPROM or flash. There are also "all flash" cards out there where no ROM is present (probably except a small boot ROM, you have to start somewhere).

Upvotes: 1

Related Questions