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(Mobile Information Device Profile)的手机游戏开发,以制作经典的“贪吃蛇”游戏为例。MIDlet是J2ME中的一个核心概念,它是一种轻量级的Java应用程序,专门设计用于移动电话和其他...
本文将详细介绍如何在JBuilder2006中配置和运行J2ME MIDlet项目,以解决启动后立即关闭的问题。 首先,确保已经安装了Sun Wireless Toolkit (WTK) 2.2。尽管JBuilder2006自带了WTK,但有时使用独立安装的WTK可能会...
Java 2 Micro Edition (J2ME) 是一种用于开发小型设备和嵌入式系统的...在《How-to-Digitally-Sign-a-J2ME-Midlet.pdf》这个文档中,你应该能找到更详细的步骤和实例,帮助你更好地理解和实践 J2ME Midlet 的数字签名。
与前一款扫雷比较,这个游戏多了一个 类,用来显示动画,也是蛇要吃的物品类, 也有了代码包,图片包,结构清晰,代码量500行,地图生成的简单算法,和播放动画的简单算法!有矩形碰撞,升级就是增加蛇的移动速度,...
改进了贪吃蛇_1 的一些BUG,增加了地图,升级,可以传真机试完! 与前一款扫雷比较,这个游戏多了一个 类,用来显示动画,也是蛇要吃的物品类, 也有了代码包,图片包,结构清晰,代码量500行,地图生成的简单算法...
贪吃蛇升级版本,与前一款扫雷比较,这个游戏多了一个 类,用来显示动画,也是蛇要吃的物品类, 也有了代码包,图片包,结构清晰,代码量500行,地图生成的简单算法,和播放动画的简单算法!有矩形碰撞,升级就是...
扫雷(2)是在扫雷(1)的基础上增加 完善了部分代码基本逻辑不变! 使得游戏更好玩了,代码两也增加到400行,比较适合初学者,可读性强,有详尽的代码注释。 数字键1标红旗,不确定,取消标记。...
扫雷(3)是在扫雷(1.2)的基础上增加 完善了部分代码基本逻辑不变! 增加绘图,线程,时间等,使得游戏更好玩了,代码400行,比较适合初学者,可读性强,有详尽的代码注释。 数字键1标红旗,不确定,取消...
【elechat: j2me midlet-开源】 `elechat` 是一个开源项目,它创建了一个J2ME(Java 2 Micro Edition)平台上的MIDlet应用,专门用于实现移动设备上的即时通讯功能。MIDlet是J2ME中的一种应用程序类型,主要用于...
我的Blog的文章源代码及工程 JAVA游戏编程之二----j2me MIDlet 手机游戏入门开发 --扫雷(1)-不含线程 <br>可以参看这篇文章 http://blog.csdn.net/kome2000/archive/2007/10/09/1817034.aspx<br>
《J2ME_MIDlet_手机游戏入门开发_俄罗斯方块》 在移动设备上开发游戏,J2ME(Java 2 Micro Edition)是一个广泛使用的平台,尤其在早期的智能手机和平板电脑中。MIDlet是J2ME中的一个应用程序模型,专为小型设备...
### Midlet程序签名机制详解 #### 一、引言 Midlet(Mobile Information Device Profile Application)是基于Java ME平台的应用程序。为了确保Midlet的安全性和可靠性,Java ME平台引入了程序签名机制。本文将详细...
标题中的"tcp.rar_chat_j2me tcp_midlet tcp_server"提到了几个关键概念:TCP、J2ME、Midlet和TCP服务器。这是一份关于Java Micro Edition (J2ME)平台下利用TCP协议进行网络通信的示例项目,具体是构建一个聊天应用...
**J2ME开发资料整理-在MIDlet中使用图标** 在Java 2 Micro Edition (J2ME)的开发环境中,MIDlet是用于移动设备和嵌入式系统的应用程序框架。MIDlet提供了丰富的功能,使得开发者能够创建交互式的、功能强大的移动...
2. 调试与运行:在主类上右键选择Run As > Emulated J2ME Midlet或Debug As > Emulated J2ME Midlet,即可进行运行和调试。 3. 打包:要打包应用,右键点击工程目录,选择J2ME > Create Package,这将生成可以在...
1. 选择运行或调试项目的菜单项,如“Run as” -> “Emulated J2ME MIDlet” 或 “Debug as” -> “Emulated J2ME MIDlet”。 2. 选择合适的仿真器运行项目,观察运行结果。 #### 总结 本文详细介绍了如何在 ...
- `<midlet>`和`<midlets>`:Midlet配置。 - `<iappli>`:针对特定平台的附加配置。 - `<resources>`:资源文件管理。 - `<filter>`子元素:资源过滤。 - `<fileset>`子元素:文件集处理。 - `<localization>`子元素...
【标题】"Midlet2.rar_midlet_simple" 涉及的是Java 2 Micro Edition (J2ME) 平台中的MIDlet应用开发,利用Lightweight User Interface Toolkit (LWUIT) 库来创建一个简单的用户界面。MIDlet是J2ME中的一个核心概念...
在提供的向导中,选择"J2ME Midlet Suite",这将是你的J2ME应用的基础。设置项目名称,如"HelloWorld",并选择保存位置。接着,选择你要支持的MIDP版本,通常是J2ME Wireless Toolkit 2.1,对应MIDP 1.0,以确保广泛...