全局平台 lockCard() 总是 return false
Global platform lockCard() always return false
我做了一个测试小程序,用卡锁权限安装
Jcop 插件 return 类似于 -
Card Manager AID : A000000151000000
Card Manager state : INITIALIZED
Application: SELECTABLE (---L----) A0A1A2A3A4A5A6
即应用程序有卡锁定权限。
我的锁卡小程序代码如下:-
boolean check = GPSystem.lockCard();
if(check == true)
ISOException.throwIt((short)0x6308);
else
ISOException.throwIt((short)0x6309);
break;
这始终是 return 0x6309,我将这段代码放在 Select 文件 INS 中,
??> /send 00a40000023f00
=> 00 A4 00 00 02 3F 00 .....?.
(55766 usec)
<= 63 09 c.
Status: 0x6309
为什么这个密码没有锁定卡有什么建议吗??
=====更新1==============
Card Manager AID : A000000151000000
Card Manager state : INITIALIZED
Application: SELECTABLE (---L----) A0A1A2A3A4A5A6
??> /select a000000151000000
=> 00 A4 04 00 08 A0 00 00 01 51 00 00 00 00 .........Q....
(73117 usec)
<= 6F 10 84 08 A0 00 00 01 51 00 00 00 A5 04 9F 65 o.......Q......e
01 FF 90 00 ....
Status: No Error
??> /send 80f0400f07a0a1a2a3a4a5a6
=> 80 F0 40 0F 07 A0 A1 A2 A3 A4 A5 A6 ..@.........
(18060 usec)
<= 69 85 i.
Status: Conditions of use not satisfied
===========更新2=================
Card Manager AID : A000000151000000
Card Manager state : INITIALIZED
Application: SELECTABLE (---L----) A0A1A2A3A4A5A6
??> /select a000000151000000
=> 00 A4 04 00 08 A0 00 00 01 51 00 00 00 00 .........Q....
(73117 usec)
<= 6F 10 84 08 A0 00 00 01 51 00 00 00 A5 04 9F 65 o.......Q......e
01 FF 90 00 ....
Status: No Error
??> /send 80f0400f07a0a1a2a3a4a5a6
=> 80 F0 40 0F 07 A0 A1 A2 A3 A4 A5 A6 ..@.........
(18060 usec)
<= 69 85 i.
Status: Conditions of use not satisfied
??> /select a000000151000000
=> 00 A4 04 00 08 A0 00 00 01 51 00 00 00 00 .........Q....
(67801 usec)
<= 6F 10 84 08 A0 00 00 01 51 00 00 00 A5 04 9F 65 o.......Q......e
01 FF 90 00 ....
Status: No Error
??> init-update 255
=> 80 50 00 00 08 D1 DB C6 FD 59 68 54 C5 00 .P.......YhT..
(176650 usec)
<= 00 00 50 04 00 03 8B 5B 12 CE 01 02 00 04 E9 7A ..P....[.......z
E0 17 6D 62 E0 56 89 DE 7E 59 88 81 90 00 ..mb.V..~Y....
Status: No Error
??> ext-auth plain
=> 84 82 00 00 10 CC D9 3C 88 3A E1 B6 A9 C1 B9 E8 .......<.:......
2A 6B 90 FE 50 *k..P
(148237 usec)
<= 90 00 ..
Status: No Error
??> /send 80f0400f07a0a1a2a3a4a5a6
=> 80 F0 40 0F 07 A0 A1 A2 A3 A4 A5 A6 ..@.........
(33521 usec)
<= 69 85 i.
Status: Conditions of use not satisfied
您可能需要将卡片生命周期状态从 INITIALIZED 更改为 SECURED。然后就可以成功锁卡了。
在 现有 GP v2.1.1 在 v2.2.1 规范上实现的映射指南 的 部分 lockCard(),它表明 "If the current card Life Cycle State is not SECURED, return false."
我做了一个测试小程序,用卡锁权限安装
Jcop 插件 return 类似于 -
Card Manager AID : A000000151000000
Card Manager state : INITIALIZED
Application: SELECTABLE (---L----) A0A1A2A3A4A5A6
即应用程序有卡锁定权限。
我的锁卡小程序代码如下:-
boolean check = GPSystem.lockCard();
if(check == true)
ISOException.throwIt((short)0x6308);
else
ISOException.throwIt((short)0x6309);
break;
这始终是 return 0x6309,我将这段代码放在 Select 文件 INS 中,
??> /send 00a40000023f00
=> 00 A4 00 00 02 3F 00 .....?.
(55766 usec)
<= 63 09 c.
Status: 0x6309
为什么这个密码没有锁定卡有什么建议吗??
=====更新1==============
Card Manager AID : A000000151000000
Card Manager state : INITIALIZED
Application: SELECTABLE (---L----) A0A1A2A3A4A5A6
??> /select a000000151000000
=> 00 A4 04 00 08 A0 00 00 01 51 00 00 00 00 .........Q....
(73117 usec)
<= 6F 10 84 08 A0 00 00 01 51 00 00 00 A5 04 9F 65 o.......Q......e
01 FF 90 00 ....
Status: No Error
??> /send 80f0400f07a0a1a2a3a4a5a6
=> 80 F0 40 0F 07 A0 A1 A2 A3 A4 A5 A6 ..@.........
(18060 usec)
<= 69 85 i.
Status: Conditions of use not satisfied
===========更新2=================
Card Manager AID : A000000151000000
Card Manager state : INITIALIZED
Application: SELECTABLE (---L----) A0A1A2A3A4A5A6
??> /select a000000151000000
=> 00 A4 04 00 08 A0 00 00 01 51 00 00 00 00 .........Q....
(73117 usec)
<= 6F 10 84 08 A0 00 00 01 51 00 00 00 A5 04 9F 65 o.......Q......e
01 FF 90 00 ....
Status: No Error
??> /send 80f0400f07a0a1a2a3a4a5a6
=> 80 F0 40 0F 07 A0 A1 A2 A3 A4 A5 A6 ..@.........
(18060 usec)
<= 69 85 i.
Status: Conditions of use not satisfied
??> /select a000000151000000
=> 00 A4 04 00 08 A0 00 00 01 51 00 00 00 00 .........Q....
(67801 usec)
<= 6F 10 84 08 A0 00 00 01 51 00 00 00 A5 04 9F 65 o.......Q......e
01 FF 90 00 ....
Status: No Error
??> init-update 255
=> 80 50 00 00 08 D1 DB C6 FD 59 68 54 C5 00 .P.......YhT..
(176650 usec)
<= 00 00 50 04 00 03 8B 5B 12 CE 01 02 00 04 E9 7A ..P....[.......z
E0 17 6D 62 E0 56 89 DE 7E 59 88 81 90 00 ..mb.V..~Y....
Status: No Error
??> ext-auth plain
=> 84 82 00 00 10 CC D9 3C 88 3A E1 B6 A9 C1 B9 E8 .......<.:......
2A 6B 90 FE 50 *k..P
(148237 usec)
<= 90 00 ..
Status: No Error
??> /send 80f0400f07a0a1a2a3a4a5a6
=> 80 F0 40 0F 07 A0 A1 A2 A3 A4 A5 A6 ..@.........
(33521 usec)
<= 69 85 i.
Status: Conditions of use not satisfied
您可能需要将卡片生命周期状态从 INITIALIZED 更改为 SECURED。然后就可以成功锁卡了。
在 现有 GP v2.1.1 在 v2.2.1 规范上实现的映射指南 的 部分 lockCard(),它表明 "If the current card Life Cycle State is not SECURED, return false."