问题
I am having trouble loading the .cap file onto the smart card, its just a basic hello world program. I keep getting LOAD failed SW 69 85 as an error. Ive tried loading the .cap using gp and gpj.
From the reading I've done it seems to be some security issue. I am still able to view the apps and delete it off the card, so the card is not locked yet. I'm just a beginner at this so help would be really appreciated.
Here is the output from gpj:
Found card in terminal: OMNIKEY Smart Card Reader USB 0
ATR: 3B 68 00 00 00 73 C8 40 11 00 90 00
DEBUG: Command APDU: 00 A4 04 00 07 A0 00 00 01 51 00 00
DEBUG: Response APDU: 6A 82
Failed to select Security Domain GP211 A0 00 00 01 51 00 00 , SW: 6A 82
DEBUG: Command APDU: 00 A4 04 00 08 A0 00 00 00 18 43 4D 00
DEBUG: Response APDU: 6A 82
Failed to select Security Domain GemaltoXpressPro A0 00 00 00 18 43 4D 00 , SW: 6A 82
DEBUG: Command APDU: 00 A4 04 00 08 A0 00 00 00 03 00 00 00
DEBUG: Response APDU: 6F 10 84 08 A0 00 00 00 03 00 00 00 A5 04 9F 65 01 FF 90 00
Successfully selected Security Domain OP201a A0 00 00 00 03 00 00 00
DEBUG: Command APDU: 80 50 00 00 08 B0 CE 42 17 DC 27 C6 14
DEBUG: Response APDU: 00 00 71 72 02 04 18 2D 6F 56 FF 02 00 08 8B 32 0E C6 0E 9B A3 FC 56
78 B7 00 EC 7B 90 00
DEBUG: Command APDU: 84 82 00 00 10 F7 28 32 AE A5 D5 64 D8 A1 D9 C4 32 93 A5 8E 21
DEBUG: Response APDU: 90 00
DEBUG: Command APDU: 84 82 00 00 08 F7 28 32 AE A5 D5 64 D8
DEBUG: Response APDU: 90 00
DEBUG: packagePath: HelloWorld/javacard/
DEBUG: package: HelloWorld
DEBUG: package AID: 01 02 03 04 05 06 07 08 09 00
DEBUG: applet AIDs: [01 02 03 04 05 06 07 08 09 00 00 ]
DEBUG: Command APDU: 80 E6 02 00 17 0A 01 02 03 04 05 06 07 08 09 00 08 A0 00 00 00 03 00 00 00 00 00 00
DEBUG: Response APDU: 00 90 00
DEBUG: Command APDU: 80 E6 02 00 17 0A 01 02 03 04 05 06 07 08 09 00 08 A0 00 00 00 03 00 00 00 00 00 00
DEBUG: Response APDU: 00 90 00
DEBUG: Command APDU: 80 E8 00 00 FF C4 82 01 60 01 00 14 DE CA FF ED 01 02 04 00 01 0A 01 02 03 04 05 06 07 08 09 00 02
00 1F 00 14 00 1F 00 0F 00 15 00 2E 00 0C 00 9A 00 0A 00 10 00 00 00 63 00 00 00 00 00 00 02 01 00 04 00 15 02 03 01 07
A0 00 00 00 62 01 01 00 01 07 A0 00 00 00 62 00 01 03 00 0F 01 0B 01 02 03 04 05 06 07 08 09 00 00 00 14 06 00 0C 00 80
03 01 00 01 07 01 00 00 00 1D 07 00 9A 00 02 10 18 8C 00 01 18 11 01 00 90 0B 87 00 18 8B 00 02 7A 01 30 8F 00 03 8C 00
04 7A 05 24 19 8B 00 05 2D 1A 03 25 61 0A 1A 04 25 10 A4 6B 03 7A 19 8B 00 06 3B 1A 07 25 32 10 07 90 0B 3D 03 10 48 38
3D 04 10 65 38 3D 05 10 6C 38 3D 06 10 6C 38 3D 07 10 6F 38 3D 08 10 21 38 3D 10 06 10 20 38 28 04 1A 08 1A 08 15 04 92
41 1F 8D 00 07 29 05 15 04 03 1A 08 15 04 92 5B 8D 00 07 3B 19 8B 00 08 3B 19 1F
DEBUG: Response APDU: 69 85
net.sourceforge.gpj.cardservices.exceptions.GPLoadException: Load failed, SW: 69 85
at net.sourceforge.gpj.cardservices.GlobalPlatformService.loadCapFile(Unknown Source)
at net.sourceforge.gpj.cardservices.GlobalPlatformService.main(Unknown Source)
This is the output I get from using gp:
Reader: OMNIKEY Smart Card Reader USB 0
ATR: 3B6800000073C84011009000
More information about your card:
http://smartcard-atr.appspot.com/parse?ATR=3B6800000073C84011009000
Auto-detected ISD AID: A000000003000000
Using SCP02 with static version 255 keys:
ENC: 404142434445464748494A4B4C4D4E4F
MAC: 404142434445464748494A4B4C4D4E4F
KEK: 404142434445464748494A4B4C4D4E4F
Session keys:
ENC: 3359D88B08CF080BCC7C233016AB9535
MAC: 3780B42F985E5E079E92A5582FB9D057
KEK: 2F30D4F35BFE97F5C55DCC57B0783663
Installing applet from package HelloWorld
openkms.gp.GPException: LOAD failed SW: 6985
at openkms.gp.GlobalPlatform.check(GlobalPlatform.java:924)
at openkms.gp.GlobalPlatform.loadCapFile(GlobalPlatform.java:606)
at openkms.gp.GlobalPlatform.loadCapFile(GlobalPlatform.java:565)
at openkms.gp.GPTool.main(GPTool.java:330)
回答1:
During the loading of the .cap file, the error code 6985
may be received for the following reasons (it should never be received because of a security or authentication failure) :
Your .cap file is not valid for your card (may be due to wrong JC version number). The
.cap
file is not converted with correct java card version.If DAP block (i.e. Tag
E2
) is in your load file data and DAP keys are not present in targeted SD (which will do the DAP verification);If you performing delegating loading and DAP block is not present in your load block, and DAP is required. Check that the targeted SD has whether DM (delegated management) privilege, if yes, then DAP block is required;
The
.cap
file you try to load is referencing and/or requiring some other packages and those packages are not installed in the card.
Please cross verify the load block and preconditions with all the above reasons. Hope this may help you.
来源:https://stackoverflow.com/questions/26547758/loading-a-cap-file-onto-a-smart-card-load-failed-sw-69-85