smart solutions for small devices
[ start | index | login ]
start > J2ME > Self signed midlets for the lazy bones

Self signed midlets for the lazy bones

Created by bjoernQ. Last edited by bjoernQ, 4 years and 99 days ago. Viewed 2,725 times. #9
[diff] [history] [edit] [rdf]
labels
attachments
SignMidlet1.jpg (42612)
SignMidlet2.jpg (37644)
example.sks (965)
signedMidlet.zip (2466)
testCA.cer (487)
While some Nokia technical documents say it's not possible to install midlets signed with a self signed certificate it works. At least on some phones. (Not on S60 3rd Edition … )

So here's a quick step-by-step how to if you don't want to tinker with Java keytool.
(If you want to do so please look at this >>forum thread)

Download >>example.sks and >>testCA.cer

Now you have to use Nokia NDS (Nokia Developer Suite for J2ME).

-Choose "Sign Application Package".
-Choose "Import Key Pair.."
-Locate the downloaded "example.sks" file
-Password is "password"
-Choose "testca" from the list (there's nothing else to choose)
-Again the password is "password"

Choose "Sign..":

-Choose the JAD file of your MIDlet

Now your MIDlet is signed. Basically two lines were added to your JAD file.

Example:

MIDlet-Certificate-1-1: MIIB4zCCAY0CBEQEq60wDQYJKoZIhvcNAQEEBQAwezELMAkGA1UEBhMCZGUxFDASBgNVBAgTC1Nlb
GYgc2lnbmVkMRQwEgYDVQQHEwtTZWxmIHNpZ25lZDEUMBIGA1UEChMLU2VsZiBzaWduZWQxFDASBg
NVBAsTC1NlbGYgc2lnbmVkMRQwEgYDVQQDEwtTZWxmIHNpZ25lZDAeFw0wNjAyMjgxOTU5NDFaFw0
xNjAxMDcxOTU5NDFaMHsxCzAJBgNVBAYTAmRlMRQwEgYDVQQIEwtTZWxmIHNpZ25lZDEUMBIGA1UE
BxMLU2VsZiBzaWduZWQxFDASBgNVBAoTC1NlbGYgc2lnbmVkMRQwEgYDVQQLEwtTZWxmIHNpZ25lZ
DEUMBIGA1UEAxMLU2VsZiBzaWduZWQwXDANBgkqhkiG9w0BAQEFAANLADBIAkEAxaMZkESxicyTxS
ElLnyuFwmfs0mfDEItCp3uSO58cQaFY8TCihBoqG44qPp8YVb/NfXeatwVaINxVdOAbn2d4wIDAQA
BMA0GCSqGSIb3DQEBBAUAA0EAPczWIYkE+0NXIK0XZXTikme+xicgBUOwNYOIPYkHKGtu5OuWVVmp
T1IvnA0gywfck7zp3gfgdIkcpwJCwJCbPA==
MIDlet-Jar-RSA-SHA1:  uE4ACE/VpdPXAOlEnrh50bZLiTxpuUCQDog5c9C+/qFO1up+X6chOyA
/TNG16TY+NO+ezO5d1kXSnXfzFfllHA==

Now send the downloaded "testCA.cer" to your phone. (e.g. via bluetooth)

Save / install the certificate.

On the phone use System / Settings/Preferences / Security / Certificate Management

Locate the newly installed certificate.

Use "Options" / "Trust settings"

Enable everything. (Set everything to "yes")

SignMidlet1

Save your settings.

Send your MIDlet to your phone. (The JAR AND the JAD file.)

Install using the JAD file! (DON'T INSTALL IT VIA THE JAR FILE ONLY!)

Now you can alter the security settings of you trusted MIDlet by using the "Application Manager". The only thing you can't set to "Always allowed" is "Messages".

SignMidlet2

For your convenience you can test this also with my >>HelloWorld MIDlet.

Please login to post a comment.
www.mobile-j.de | Bjoern Quentin