全局平台lockCard()始终返回false

时间:2016-07-01 06:48:04

标签: javacard

我制作了一个测试applet,并使用card lock priv安装它。

Jcop插件正在返回 -

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;

这总是返回0x6309,我把这段代码放在Select file 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

1 个答案:

答案 0 :(得分:6)

您可能需要将卡生命周期状态从 INITIALIZED 更改为 SECURED 。然后,您就可以成功锁定您的卡。

部分7.1.7 lockCard()现有GP v2.1.1的映射指南v2.2.1规范的实施中,它显示“如果当前的卡寿命周期状态不是SECURED,返回false。“

enter image description here