我通过 Eclipse 制作了流行的“Hello World”javacard 代码的 .cap 文件
现在我想通过 GPSShell 和 ACR38 智能卡读卡器将它加载到真正的 javacard 中。
问题:我需要任何密钥来加载卡中的 .cap 文件吗?我的意思是,我应该在将我的小程序上传到卡中之前进行身份验证还是没有必要?我认为验证是必需的。未经身份验证就上传 .cap 是不合理的。但我不知道,如何进行身份验证。问题:这有什么问题?
C:\Users\ghasemi>java -jar e:\gpj\gpj.jar -load e:\helloWorld.cap -install
Found terminals: [PC/SC terminal ACS CCID USB Reader 0]
javax.smartcardio.CardException: connect() failed
at sun.security.smartcardio.TerminalImpl.connect(Unknown Source)
at net.sourceforge.gpj.cardservices.GlobalPlatformService.main(Unknown S
ource)
Caused by: sun.security.smartcardio.PCSCException: SCARD_E_SHARING_VIOLATION
at sun.security.smartcardio.PCSC.SCardConnect(Native Method)
at sun.security.smartcardio.CardImpl.<init>(Unknown Source)
... 2 more
Found card in terminal: ACS CCID USB Reader 0
java.lang.NullPointerException
at net.sourceforge.gpj.cardservices.GlobalPlatformService.main(Unknown S
ource)
C:\Users\ghasemi>java -jar e:\gpj\gpj.jar -load e:\helloWorld.cap -install
Found terminals: [PC/SC terminal ACS CCID USB Reader 0]
Found card in terminal: ACS CCID USB Reader 0
ATR: 3B 7F 94 00 00 80 31 80 65 B0 85 02 02 ED 12 0F FF 82 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: 6F 65 84 08 A0 00 00 00 18 43 4D 00 A5 59 73 4A 06 07 2A 8
6 48 86 FC 6B 01 60 0C 06 0A 2A 86 48 86 FC 6B 02 02 01 01 63 09 06 07 2A 86 48
86 FC 6B 03 64 0B 06 09 2A 86 48 86 FC 6B 04 01 05 65 0B 06 09 2B 85 10 86 48 64
02 01 03 66 0C 06 0A 2B 06 01 04 01 2A 02 6E 01 02 9F 6E 06 12 91 20 11 02 02 9
F 65 01 FF 90 00
Successfully selected Security Domain GemaltoXpressPro A0 00 00 00 18 43 4D 00
DEBUG: Command APDU: 80 50 00 00 08 17 2A 53 4F AC DF 8D 16
DEBUG: Response APDU: 69 82
javax.smartcardio.CardException: Wrong initialize update, SW: 69 82
at net.sourceforge.gpj.cardservices.GlobalPlatformService.openSecureChan
nel(Unknown Source)
at net.sourceforge.gpj.cardservices.GlobalPlatformService.main(Unknown S
ource)
tnx