サンプル (JavaPurse、HelloWorld) の CAP ファイルを JavaCard にロードする際に問題が発生しました。応答 APDU: 69 85 です。GPJ と jcManager の両方を使用しましたが、うまくいきませんでした。
GPJ トレースは次のとおりです。
C:\java_card_kit-2_2_2\gpj-20120310>"..\..\Program Files\Java\jre6\bin\java.exe" -jar gpj.jar -load ..\samples\classes\com\sun\javacard\samples\JavaPurse\javacard\JavaPurse.cap -install -list
Found terminals: [PC/SC terminal Gemplus USB SmartCard Reader 0]
Found card in terminal: Gemplus USB SmartCard Reader 0
ATR: 3B 68 00 00 00 73 C8 40 12 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 0
0
Successfully selected Security Domain OP201a A0 00 00 00 03 00 00 00
DEBUG: Command APDU: 80 50 00 00 08 26 5F FC 46 75 E5 13 62
DEBUG: Response APDU: 00 00 02 52 01 00 93 6E 1C 88 FF 02 00 2C BE 39 5E A5 07 5
5 53 1D 65 EB A7 49 56 87 90 00
DEBUG: Command APDU: 84 82 00 00 10 6C B2 42 6D 2D 6C D2 34 45 F0 8C 8F A5 7B D
4 14
DEBUG: Response APDU: 90 00
DEBUG: Command APDU: 84 82 00 00 08 6C B2 42 6D 2D 6C D2 34
DEBUG: Response APDU: 90 00
DEBUG: packagePath: com/sun/javacard/samples/JavaPurse/javacard/
DEBUG: package: com.sun.javacard.samples.JavaPurse
DEBUG: package AID: A0 00 00 00 62 03 01 0C 02
DEBUG: applet AIDs: [A0 00 00 00 62 03 01 0C 02 01 ]
DEBUG: Command APDU: 80 E6 02 00 16 09 A0 00 00 00 62 03 01 0C 02 08 A0 00 00 0
0 03 00 00 00 00 00 00
DEBUG: Response APDU: 00 90 00
DEBUG: Command APDU: 80 E6 02 00 16 09 A0 00 00 00 62 03 01 0C 02 08 A0 00 00 0
0 03 00 00 00 00 00 00
DEBUG: Response APDU: 00 90 00
DEBUG: Command APDU: 80 E8 00 00 FF C4 82 0E 20 01 00 13 DE CA FF ED 01 02 04 0
0 01 09 A0 00 00 00 62 03 01 0C 02 02 00 1F 00 13 00 1F 00 0E 00 21 01 72 00 40
0A 6E 00 10 01 74 00 00 03 84 00 02 00 01 00 03 03 01 00 04 00 21 03 00 01 07 A0
00 00 00 62 00 01 03 01 07 A0 00 00 00 62 01 01 00 01 09 A0 00 00 00 62 03 01 0
C 04 03 00 0E 01 0A A0 00 00 00 62 03 01 0C 02 01 00 CA 06 00 40 00 80 00 04 00
01 01 00 00 04 00 37 00 63 00 95 00 A1 00 81 03 10 00 0D 04 04 00 00 01 94 FF FF
FF FF 01 A1 00 80 00 02 00 01 01 04 00 00 09 E7 09 EC 0A 12 0A 27 00 80 00 01 0
0 01 01 00 00 00 07 0A 6E 00 05 31 18 8C 00 20 18 02 88 00 18 1D 04 41 5B 30 1D
88 01 18 AE 01 91 00 1B 87 02 03 32 1F AE 01 6D 15 AD 02 1F 8F 00 1B 3D 1E 8C 00
17 37 1F 04 41 5B 32 70 EA 7A 03 20 1D 04 6C 0A 1D AE 01 04 43 5B 6F 08 11 6A 8
3
DEBUG: Response APDU: 69 85
DEBUG: Command APDU: 80 E8 00 00 FF C4 82 0E 20 01 00 13 DE CA FF ED 01 02 04 0
0 01 09 A0 00 00 00 62 03 01 0C 02 02 00 1F 00 13 00 1F 00 0E 00 21 01 72 00 40
0A 6E 00 10 01 74 00 00 03 84 00 02 00 01 00 03 03 01 00 04 00 21 03 00 01 07 A0
00 00 00 62 00 01 03 01 07 A0 00 00 00 62 01 01 00 01 09 A0 00 00 00 62 03 01 0
C 04 03 00 0E 01 0A A0 00 00 00 62 03 01 0C 02 01 00 CA 06 00 40 00 80 00 04 00
01 01 00 00 04 00 37 00 63 00 95 00 A1 00 81 03 10 00 0D 04 04 00 00 01 94 FF FF
FF FF 01 A1 00 80 00 02 00 01 01 04 00 00 09 E7 09 EC 0A 12 0A 27 00 80 00 01 0
0 01 01 00 00 00 07 0A 6E 00 05 31 18 8C 00 20 18 02 88 00 18 1D 04 41 5B 30 1D
88 01 18 AE 01 91 00 1B 87 02 03 32 1F AE 01 6D 15 AD 02 1F 8F 00 1B 3D 1E 8C 00
17 37 1F 04 41 5B 32 70 EA 7A 03 20 1D 04 6C 0A 1D AE 01 04 43 5B 6F 08 11 6A 8
3
DEBUG: Response APDU: 69 85
net.sourceforge.gpj.cardservices.exceptions.GPLoadException: Load failed, SW: 69 85
at net.sourceforge.gpj.cardservices.GlobalPlatformService.loadCapFile(Un known Source)
at net.sourceforge.gpj.cardservices.GlobalPlatformService.main(Unknown S ource)
jcManager からのトレース:
Open terminal ...
EstablishContext(): ...
Wait for card in a certain reader ...
Pick reader ...
**********************
Selecting Card Manager
***********************
-> 00 A4 04 00 08 A0 00 00 00 03 00 00 00
<- 6F 10 84 08 A0 00 00 00 03 00 00 00 A5 04 9F 65 01 FF 90 00
************
Init Update
*************
-> 80 50 00 00 08 21 0E BF 30 95 AD B3 31
<- 00 00 02 52 01 00 93 6E 1C 88 FF 02 00 29 44 06 FE 6A F1 4F 45 24 65 22 CB D6 88 F8 90 00
HostChallenge: 21 0E BF 30 95 AD B3 31
CardChallenge: 44 06 FE 6A F1 4F
Card Calculated Card Cryptogram: 45 24 65 22 CB D6 88 F8
Derivation Data is 01 82 00 29 00 00 00 00 00 00 00 00 00 00 00 00
Host Cryptogram Data (to encrypt) 00 29 44 06 FE 6A F1 4F 21 0E BF 30 95 AD B3 31 80 00 00 00 00 00 00 00
Card Cryptogram Data (to encrypt for verification) 21 0E BF 30 95 AD B3 31 00 29 44 06 FE 6A F1 4F 80 00 00 00 00 00 00 00
S_ENC: A6 A3 71 6D C7 49 BD 71 7E 4D E9 A4 19 B6 D9 42 A6 A3 71 6D C7 49 BD 71
The Current session MAC key is FC FB E2 6E 84 98 E6 C4 C3 8E 91 87 D6 E5 EB C9
The Current session DEK key is EA 3E AF C5 2A 29 6D 41 7B D1 85 5B F1 05 06 11
Encrypted CardCryptoGram is 48 C6 AA EA 70 9E BE F2 14 F5 1C D9 9A 37 AE 57 45 24 65 22 CB D6 88 F8
Encrypted HostCryptoGram is 80 40 92 C0 B7 6A 6E E0 9B D4 79 7D 95 62 36 15 45 31 AE 05 91 86 9B CE
-> 84 82 03 00 10 45 31 AE 05 91 86 9B CE 3B EA 06 63 1C 2E E7 CF
<- 90 00
Authenticated
SCP: 02
Installed applets:
-> 84 F2 40 00 10 11 43 31 AA 2D DA 03 A8 4D E7 6A 35 3D 27 C8 B0
<- 6A 88
Installed packages:
-> 84 F2 20 00 10 11 43 31 AA 2D DA 03 A8 A5 D2 14 32 03 20 DE D9
<- 6A 88
...
+==========================+
set JC_HOME=C:\java_card_kit-2_2_2;
set JAVA_HOME=C:\jdk1.5.0;
set ANT_HOME=C:\ant-1.6.2;
set PATH=.;%JC_HOME%\bin;%JAVA_HOME%\bin;%ANT_HOME%\bin;%PATH%
+==========================+