如何加载CAP文件,Java卡 [英] How to load CAP file to java card

查看:812
本文介绍了如何加载CAP文件,Java卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Java卡,你能帮助我如何解析Aplet CAP文件到APDU,
安装此CAP文件到卡支载GP2.2。


< DIV CLASS =h2_lin>解决方案

您应该尝试使用 GPShell 这将做的工作适合你。您需要执行一些全球平台的命令:




  • 安装[负载]

  • 加载

  • 安装[用于安装和使可选]



GPshell会为你做这个,以及作为安全(你需要SCP02进行身份验证,在一个脚本,将是这样的:

  mode_211 
enable_trace
establish_context
card_connect -reader<您的读者的PC / SC这里名称>
选择-aid A0000001510000
open_sc -security 1 -keyind 0 -keyver 32 -enc_key 11111111111111111111111111111111 - 的mac_key 22222222222222222222222222222222 -kek_key 33333333333333333333333333333333 -scp 2 -scpimpl 21
install_for_load -pkgAID<在这里你的包AID> -sdAID<在这里你的SSD> -nvCodeLimit 0
负载-file your.cap
install_for_install -aid<您的应用程序AID> -pkgAID<您的包AID> -instAID<您的实例AID>

角度支架上面的物品当然应该在上面的脚本编辑。如果没有定义的SSD,你还不如使用ISD的AID(A0000001510000)。


I am new to java card,Can you help me how to parse Aplet CAP file into the APDU, For installing this CAP file to the card suported GP2.2.

解决方案

You should try using GPShell which will do the work for you. You need to perform a number of GlobalPlatform commands :

  • Install [for load]
  • Load
  • Install [for install and make selectable]

GPshell will do this for you, as well as the security (you need to authenticate with SCP02, in a script that will look like this :

mode_211
enable_trace
establish_context
card_connect -reader "<your reader's PC/SC name here>"
select -AID A0000001510000
open_sc -security 1 -keyind 0 -keyver 32 -enc_key 11111111111111111111111111111111 -mac_key 22222222222222222222222222222222 -kek_key 33333333333333333333333333333333 -scp 2 -scpimpl 21
install_for_load -pkgAID <your package AID here> -sdAID <your SSD here> -nvCodeLimit 0
load -file your.cap
install_for_install -AID <your Application AID> -pkgAID <your package AID> -instAID <your instance AID>

Angle bracket items above should of course be edited in the script above. If the SSD is not defined, you might as well use the ISD's AID (A0000001510000).

这篇关于如何加载CAP文件,Java卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆