How to sign Midlet with self issued certificate

本文介绍如何通过自签名证书为MIDlet应用进行签名。包括生成密钥库及密钥对、创建自签名证书、使用JadTool为MIDlet添加证书等步骤。适用于希望自行创建证书来签署Java移动应用的开发者。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

How to sign Midlet with self issued certificate

1- Generate a keystore and key pair

C:\JDKHOME\bin>keytool -genkey -alias {my alias} -keyalg RSA -validity 365 -keystore c:\keystorename.ks

Enter keystore password: password 
What is your first and last name? [Unknown]: My Name 
What is the name of your organizational unit? [Unknown]: company 
What is the name of your organization? [Unknown]: company 
What is the name of your City or Locality? [Unknown]: location 
What is the name of your State or Province? [Unknown]: location2 
What is the two-letter country code for this unit? [Unknown]: GB 
Is CN=My Name, OU=company, O=company, L=location, ST=location2, C=GB correct? [no]: yes 
Enter key password for (RETURN if same as keystore password):

2-list all keypairs

C:\JDKHOME\bin>keytool -list -keystore c:\KeyStoreName.ks

3-create the self issued certifiacte

C:\JDKHOME\bin>keytool -export -alias {my alias} -file c:\CertificateName.crt -keystore c:\KeyStoreName.ks

4-sign the midlet

C:\WTKHOME>java -jar JadTool.jar -addcert -alias {my alias} -storepass {KeyStorePassword} -keystore c:\KeyStoreName.ks -inputjad {JAD Name} -outputjad {JAD Name}

C:\WTKHOME>java -jar JadTool.jar -addjarsig -alias {my alias} -jarfile {JAR Name} -storepass {KeyStorePassword} -keystore c:\KeyStoreName.ks -inputjad

C:\WTKHOME>java -jar JadTool.jar -addjarsig -alias {my alias} -jarfile {JAR Name} -storepass {KeyStorePassword} -keypass {KeyStoreName} -keystore c:\KeyStoreName.ks -inputjad {JAD Name} -outputjad {JAD Name}

5-Install the self issued certificate at your mobile

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值