from http://m-shaheen.blogspot.com/2009/07/1.html
MIDlet Signing process steps can be summarized into :
1. Generate public/private key pairs.
2. Generate Certificate Signing Request (CSR) and submit it to CA .
3. Sign the MIDLet with the certificate.
Software requirements
1. Sun java 2 SDK or JRE
2. Sun Wireless Tool Kit (WTK)
The steps are:
1. Generate public/private key pairs
a. Create a Keystore:
From command line Navigate to java 2 SDK bin directory and type the below command :
keytool -genkey -keyalg rsa -keystore <keystore_filename> -alias <alias_name>
it prompts you to enter a password for your keystore, your name, organization, and address.
b. List the generated keypairs
To see your generated keypairs entry ,type the below command :
keytool -keystore <keystore_filename> -list
2. Generate Certificate Signing Request (CSR) and submit it to CA :
You need to generate a (CSR) for the enrollment process.
a. generate CSR
Type the below command to create a CSR for the key pair in the keystore:
keytool –certreq –file <certreq_filename.csr> –keystore <keystore_filename> -alias <alias_name>
b. submit the generated CSR to CA
3. Sign the MIDLet with the certificate:
Once the CA has approved your request, you will receive the certificate, the steps are:
a. Import the certificate to your Keystore
Use the below command
keytool –import –trustcacerts –keystore <keystore_filename> -alias <alias_name> -file <cert_filename>
b. Sign the JAD file
Use JadTool utility to signs a JAR file by adding both of the certificate and the JAR file’s digital signature to the Java Application Descriptor (JAD) file, the process will be :
b.a. Adding the certificate to JAD
use JadTool.jar tadd the certificate as the value of an attribute named MIDlet-Certificate-m-n, where m is the number of the certificate chain, and n is an integer that, for new certificates, begins at one and increments by one each time you add a new certificate to the JAD file.
Java -jar %WTK_HOME%\bin\JadTool.jar -addcert -keystore <keystorename> -alias <aliasname> -storepass <password> -inputjad <input_jadfile> -outputjad <output_jadfile>
You should see the below attributes added to your output jad file
MIDlet-Certificate-1-1,MIDlet-Certificate-1-2,MIDlet-Certificate-1-3
b.b. Adding JAR’s digital signature to the JAD
Gets the JAR’ digital signature, stores it as the value of the MIDlet-Jar-RSA-SHA1 attribute of the output JAD file.
java -jar %WTK_HOME%\bin\jadtool.jar -addjarsig -jarfile <jar_file> -keystore <keystorename> -alias <aliasname> -storepass <password> -keypass <password> -inputjad <input_jadfile> -outputjad <output_jadfile>
Where The default value for -jarfile is the MIDlet-Jar-URL property in the JAD file.
References:
https://knowledge.verisign.com/support/ssl-certificates-support/index?page=content&id=AR185
https://knowledge.verisign.com/support/ssl-certificates-support/index?page=content&id=SO8381
http://java.sun.com/products/sjwtoolkit/wtk2.5.2/docs/UserGuide-html/commandline.html
http://java.sun.com/j2se/1.4/docs/tooldocs/win32/keytool.html
http://java.sun.com/javame/reference/docs/sjwc-2.2/pdf-html/html/tools/jadtool.html
相关推荐
j2me midlet midp2.0和随附的Java聊天服务器,用于在jabber聊天室中进行交互
与前一款扫雷比较,这个游戏多了一个 类,用来显示动画,也是蛇要吃的物品类, 也有了代码包,图片包,结构清晰,代码量500行,地图生成的简单算法,和播放动画的简单算法!有矩形碰撞,升级就是增加蛇的移动速度,...
改进了贪吃蛇_1 的一些BUG,增加了地图,升级,可以传真机试完! 与前一款扫雷比较,这个游戏多了一个 类,用来显示动画,也是蛇要吃的物品类, 也有了代码包,图片包,结构清晰,代码量500行,地图生成的简单算法...
贪吃蛇升级版本,与前一款扫雷比较,这个游戏多了一个 类,用来显示动画,也是蛇要吃的物品类, 也有了代码包,图片包,结构清晰,代码量500行,地图生成的简单算法,和播放动画的简单算法!有矩形碰撞,升级就是...
扫雷(2)是在扫雷(1)的基础上增加 完善了部分代码基本逻辑不变! 使得游戏更好玩了,代码两也增加到400行,比较适合初学者,可读性强,有详尽的代码注释。 数字键1标红旗,不确定,取消标记。...
扫雷(3)是在扫雷(1.2)的基础上增加 完善了部分代码基本逻辑不变! 增加绘图,线程,时间等,使得游戏更好玩了,代码400行,比较适合初学者,可读性强,有详尽的代码注释。 数字键1标红旗,不确定,取消...
我的Blog的文章源代码及工程 JAVA游戏编程之二----j2me MIDlet 手机游戏入门开发 --扫雷(1)-不含线程 <br>可以参看这篇文章 http://blog.csdn.net/kome2000/archive/2007/10/09/1817034.aspx<br>
贪吃蛇升级版本,与前一款扫雷比较,这个游戏多了一个 类,用来显示动画,也是蛇要吃的物品类, 也有了代码包,图片包,结构清晰,代码量500行
J2ME无线开发之MIDlet的部署及push自启动j2me程序J2ME无线开发之MIDlet的部署及push自启动j2me程序J2ME无线开发之MIDlet的部署及push自启动j2me程序
本教程从一开始就以简单的语言说明了如何对Java Mobile Midlet进行数字签名。
在进行j2me项目开发,工具eclipse调试出现错误时不能定位到某行,用jbuilder2006能解决这个问题。现在对其配置进行详细说明。
详细介绍了midlet程序签名机制,包括三种信任域的不同、开发过程中使用的签名与产品签名的不同等内容。并基于MOTO手机开发平台给出示例。
j2se编写的俄罗斯方块游戏,注释详尽,代码完全公开,本例只有500行代码,1个类,学习写游戏不要错过啊! 这个是的移植 j2me 版本,大家可以参看这两个版本的区别!
Complete_Guide_to_J2ME_Polish.pdf
Complete_Guide_to_J2ME_Polish 介绍了polish技术,pdf格式
EclipseME 是帮助你开发J2ME MIDlet 的Eclipse 插件。 EclipseME 可以帮助你简化Java 2 Micro Edition (C) Midlet 的开发工作。 EclipseME 帮助你轻松的把无线工具包整合到 Eclipse 开发环境中, 使你不必再...
//Create a J2ME MIDP Midlet Suite //Create a J2ME Midlet : Menu package Net.Snail.zm; import javax.microedition.lcdui.Display; import javax.microedition.midlet.MIDlet; import javax.microedition....
this is simple example of j2me midlet by using lwuit library in which simple form is displayed
J2ME开发 J2ME开发 J2ME开发 J2ME开发
带有套接字服务器的J2ME MIDlet ::等距引擎聊天机