Mark Javacard applet as implicit selectable (default applet) after install

£可爱£侵袭症+ 提交于 2019-12-12 15:11:21

问题


I'm looking for a way to mark an applet as the implicit selectable/"selected by default" applet after it already has been uploaded and installed on a Global Platform/JCOP 2.4.2 R1 system (for starters in the NXP JCOP Tools Java Card Simulation).

The applet has been installed without the -d parameter in the JCOP shell:

cm> install -i a000100201100001  -q C9#() a000100201100000 a000100201100001
 => 80 E6 [...]
 90 00

after that the state is

Card Manager AID   :  A000000003000000
Card Manager state :  OP_READY

    Application:  SELECTABLE (--------) A000100201100001
    Load File  :      LOADED (--------) A0000000035350   (Security Domain)
     Module    :                        A000000003535041
    Load File  :      LOADED (--------) A000100201100000
     Module    :                        A000100201100001

The desired result is

Card Manager AID   :  A000000003000000
Card Manager state :  OP_READY

    Application:  SELECTABLE (-----D--) A000100201100001
    Load File  :      LOADED (--------) A0000000035350
    [...]

That's the output when the applet is installed with the -d|--default parameter.
I suspect changing this attribute is somehow done via the STORE-DATA command in the card manager applet but haven't been able to find the exact, detailed command (structure) - not even the tag that needs to be modified.


回答1:


It depends on cards - not all of them seem to support making an applet default after installation. But you can use the open source GlobalPlatform tool for Java that has --make-default <AID> option:

java -jar gp.jar --make-default A000100201100001

IIRC JCOP was one of the cards that actually supported it.



来源:https://stackoverflow.com/questions/22934621/mark-javacard-applet-as-implicit-selectable-default-applet-after-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!