无法在 JavaCard 上加载小程序

问题描述

我正在尝试将我制作的小程序上传到真正的智能卡上。我尝试过像 JCWDE 和 CREF 这样的模拟器,它完美地工作。 但是对于我的智能卡,即使系统(我正在使用 GlobalPlatformPro 工具通过 gp -load 命令加载)识别卡,它也总是为我想做的每个操作显示错误,我不知道如何解决它。

这是 GlobalPlateform 的结果(带有 -d -v 选项):

C:\Java>gp -load javacard -d -v
GlobalPlatformPro 18.09.14-0-gb439b52
Running on Windows 10 10.0 amd64,Java 1.8.0_291 by Oracle Corporation
# Detected readers from JNA2PCSC
[ ] JAVACOS Virtual Contact Reader 0
[ ] JAVACOS Virtual Contactless Reader 1
[*] OMNIKEY AG Smart Card Reader USB 0
SCardConnect("OMNIKEY AG Smart Card Reader USB 0",T=*) -> T=0,3B7D9400005744290830869312C090111E1A
SCardBeginTransaction("OMNIKEY AG Smart Card Reader USB 0")
Reader: OMNIKEY AG Smart Card Reader USB 0
ATR: 3B7D9400005744290830869312C090111E1A
More information about your card:
    http://smartcard-atr.appspot.com/parse?ATR=3B7D9400005744290830869312C090111E1A

A>> T=0 (4+0000) 00A40400 00
A<< (0018+2) (16ms) 6F108408A000000003000000A5049F6501FF 9000
[DEBUG] GlobalPlatform - Auto-detected ISD: A000000003000000
Warning: no keys given,using default test key 404142434445464748494A4B4C4D4E4F
A>> T=0 (4+0008) 80500000 08 007D0897841EECAB 00
A<< (0000+2) (31ms) 6D00
INITIALIZE UPDATE Failed: 0x6D00 (Invalid INStruction)

这是 PyAptduTool 的结果:

Select CardManager begin...
Select CardManager successful.
Download Cap begin...
Download Cap successful.
Install Applet begin...
Install Applet successful.
Select Applet begin...
Select Applet successful.

我尝试使用 gpj,这是输出

Found card in terminal: OMNIKEY AG Smart Card Reader USB 0
ATR: 3B 7D 94 00 00 57 44 29 08 30 86 93 12 C0 90 11 24 1F
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 6A 40 39 0E 99 CC 40 D0
DEBUG: Response APDU: 6D 00
javax.smartcardio.CardException: Wrong initialize update,SW: 6D 00
        at net.sourceforge.gpj.cardservices.GlobalPlatformService.openSecureChannel(UnkNown Source)
        at net.sourceforge.gpj.cardservices.GlobalPlatformService.main(UnkNown Source)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...