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