将.cap文件加载到智能卡上:LOAD失败SW 69 85

时间:2014-10-24 12:21:03

标签: smartcard javacard

我无法将.cap文件加载到智能卡上,这只是一个基本的hello world程序。我一直把LOAD失败的SW 69 85作为错误。我尝试使用gp和gpj加载.cap。

从我所做的阅读中,它似乎是一些安全问题。我仍然可以查看应用程序并将其从卡中删除,因此该卡尚未锁定。我只是一个初学者,所以非常感谢你的帮助。

这是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)

这是我使用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 个答案:

答案 0 :(得分:2)

在加载.cap文件期间,可能会收到错误代码6985,原因如下(由于安全性或身份验证失败,不应再收到错误代码):

  1. 您的.cap文件对您的卡无效(可能是由于错误的JC版本号)。 .cap文件未使用正确的Java卡版本进行转换。

  2. 如果DAP阻止(即标记E2)在您的加载文件数据中,并且目标SD中不存在DAP密钥(将进行DAP验证);

  3. 如果执行委派加载,并且加载块中不存在DAP块,则需要DAP。检查目标SD是否具有DM(委派管理)权限,如果是,则需要DAP阻止;

  4. 您尝试加载的.cap文件正在引用和/或需要其他一些软件包,并且这些软件包未安装在卡中。

  5. 请出于上述各种原因交叉验证加载块和前提条件。 希望这可以帮到你。