Skip to main content

How to sign MIDlets with different certificates

4 replies [Last post]
vsizikov
Offline
Joined: 2004-11-16

Hi Murali,

A question first: Are we talking about standard automated tests or OTA tests?
For automated tests, read below. OTA is a special case, we can discuss it
later if the need arises.

> I have a bunch of Midlets in my test suite.But i
> want to sign only some of the Midlets with
> special certification.
>
> Actually when i tried with default certification, it
> was signing all Midlets.
>
> What is the proecedure to sign only some midlets in
> my test suite?

ME Framework doesn't deal with arbitrary MIDlets. ME Framework deals
with tests, and the tests are bundled into the test bundles. For MIDP, the test
bundle is a MIDlet. For CLDC, the bundle is just a JAR file, and for CDC there is
no bundling at all.

So, all tests bundles in MIDP case are MIDlets, and the Framework signs them
with certificate specified by user. 3rd party MIDlets not directly related to the
test bundles, are outside of ME Framework area of responsibility, and there is
no direct support for them.

For particular test suite, like in your case, it's up to you to decide how to handle
those additional MIDlets. You could perform any actions during test suite startup
(when the tets run starts), and in that custom code you could sign MIDlets, start
servers, or do anything that Java can do. We have utility classes that could simplify
your signing code: FastJKSSigner, JKSSigner.

But this approach means that for *every* test run you'll have to sign those extra MIDlets, over and over again, which might result in some noticeable delay during test suite start.

Another possibility is to write external scripts (be it Ant, Shell, BAT files), and instruct users to enter their credentials somewhere (into some file), and then to invoke the script, just once, signing the MIDlets. Yes, that's a bit more complex for users, but on the other hand, that will improve test start times.

Hopefully, I correctly understood your situation: You'd like to create additional MIDlets and sign them with different certificate. But how are you going to deliver them on the device? The device will be executing the normal tests at that time. Or, do you plan to have multiple devices at the same time, some running automated tests, and some other devices just executing additional MIDlets manually? Or, maybe you just would like to mark some tests to be executed in MIDlet that is signed by different certificate?

It would be great if you could describe your situation in more detail.

Thanks,
--Vladimir

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
murali_reddy219
Offline
Joined: 2007-10-25

Hi Vladimir,

Thanks for your detailed reply. My concern was if i give configuration as trusted in test harness interview interface, all the midlets are getting signed which i don't require. I want only few midlets to be signed. How to specify it through ME Framework or Test Harness configuration?

murali_reddy219
Offline
Joined: 2007-10-25

Hi Vladimir,

We found the solution for signing in Me Framework developers guide.

Thanks for your valuable support.

Regards,
Murali

vsizikov
Offline
Joined: 2004-11-16

Hi Murali,

> We found the solution for signing in Me Framework
> developers guide.

That's good news! But we might be talking about a bit different things, because I'm not sure how it is possible to do what *I think* you're trying to do.

Could you please describe the solution, and let's see whether we're in sync and talking about the same thing. These security related issues are tricky and I'd like to make sure that you're selecting the most applicable solution for your situation.

Thanks,
--Vladimir

murali_reddy219
Offline
Joined: 2007-10-25

Hi Vladimir,

You did not understand my problem.

Suppose i have 10 test case midlets.If i run all these tests under [b]trusted[/b] condition, all midlets will get signed with default certificate. But I want only 1 out of 10 need to be signed with default or custom certificate.

Actually this is my problem.I got a key point in framework developers guide pdf.If you make all test cases( except the one which you want to sign ) as untrusted in test description file, and run the tests under trusted condition, then only 1 test midlet will get signed.

I asked the above question.But i get the answer in that pdf.

Thanks,
--Murali