Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
canamgroup
Posts: 117
Registered: ‎07-16-2008
My Device: Not Specified
Accepted Solution

Need help regarding code signing.

Hello,

 

I made an application that requires code signing because I'm using the "Auto-run on startup" feature (that is what I was told).  I'm not using any restricted classes.

 

So, I requested a key from RIM and received it.

I received only one file named "client-RCR-########.csi" (the e-mail was talking about three files though: RBB, RCR, RRT).  Nevertheless, I followed the instruction and managed to install that .csi without any error (I received an confirmation e-mail).

 

Now, I want to sign my code...

I tried using "Build - Request Signatures" in my Blackberry JDE and this was displayed:

javaw.exe  -jar "C:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\bin\SignatureTool.jar" -f -d "C:\Documents and Settings\johndoe\Local Settings\Temp\RIMSigTool65120.tmp"

 

However, nothing happens (that jar file is there though).

 

I looked further and found a "Signature Tool" under "Blackberry JDE Component Package 4.2.1" in the "Programs" menu.

When I launch this, I am prompted for a .COD file.  I select mine and then I see a window displaying six times my .COD file that says my COD file doesn't require a signature.

 

Also, by looking around this forum, I saw some people saying a .CSL file is required... but I don't have that file in my project directory.

 

So, to make a long story short, I'm kind of confused about what should I do next to have my application run on startup on the Blackberry.  How should I sign it?

 

Thanks for you help!

Please use plain text.
New Developer
Blizzz
Posts: 10
Registered: ‎07-17-2008
My Device: Not Specified

Re: Need help regarding code signing.

You should have gotten 3 emails. if you only got one, maybe check your spam folder or contact rim.

I just went through signing two weeks ago and got 3 seperate emails with one key each as attachment

Please use plain text.
Developer
canamgroup
Posts: 117
Registered: ‎07-16-2008
My Device: Not Specified

Re: Need help regarding code signing.

You are absolutely right!

I had two more e-mail that were blocked by our content filtering software.

 

I installed the other two files successfully... but I still don't know what to do next.

 

I still don't have a .CSL file in my project folder, I still can't start the "Request signatures" from the "Build" menu in the Blackberry JDE and it still says I don't need to sign my application in the "Signature Tool" from the BlackBerry JDE Component Package 4.2.1.

 

Thanks!

Please use plain text.
Developer
richard_puckett
Posts: 191
Registered: ‎04-03-2008
My Device: Bold 9700

Re: Need help regarding code signing.

The CSL file should be generated from rapc.  Just FYI, here's a sample of my build and sign ant targets (using the awesome bb-ant-tools).

 

<project name="mobiyana-thing" default="build" basedir=".">

 

<property file="build.properties"/> <fail unless="jde.home" message="Please ensure that you have a valid build.properties file available" /> <property name="lib.dir" value="${basedir}/lib" /> <property name="src.dir" value="${basedir}/src" /> <property name="res.dir" value="${basedir}/res" /> <property name="dest.dir" value="${basedir}/deployed" /> <typedef resource="bb-ant-defs.xml" classpath="${lib.dir}/bb-ant-tools.jar" /> <target name="build" description="Build with bb-ant-tools"> <rapc output="MobiThing" destdir="${dest.dir}" quiet="true"> <jdp type="cldc" file="gui.properties" /> <src> <fileset dir="${src.dir}"> <include name="**/*.java" /> </fileset> <fileset dir="${res.dir}"> <include name="**/*.*" /> </fileset> </src> </rapc> </target> <target name="sign" depends="build" description="RIM COD Signing"> <sigtool jdehome="${jde430.home}" codfile="${dest.dir}/MobiThing.cod" password="${signing.password}" /> </target>

 

</project>

 

build.properties:

 

 

jde.home=C:/Program Files/Research In Motion/BlackBerry JDE 4.2.1 jde430.home=C:/Program Files/Research In Motion/BlackBerry JDE 4.3.0 signing.password=mySecretPassword simulator.dir=${jde.home}/simulator

 

 

gui.properties:

 

gui.properties:

 

description=Mobiyana Thing icon=../res/icon-32x32.png title=Mobiyana Thing vendor=Mobiyana, LLC. version=1.0

 

Please use plain text.
Developer
canamgroup
Posts: 117
Registered: ‎07-16-2008
My Device: Not Specified

Re: Need help regarding code signing.

[ Edited ]

I didn't know what RAPC was... so I look around and found this definition:
"Use the RAPC command prompt compiler to compile .java and .jar files into .cod files that you can run in the BlackBerry device simulator or load onto a BlackBerry device."
 
I already have a .cod file (I'm using the Blackberry JDE to compile).  I don't even know if I need to have a .csl file... I just saw mention to this on other post about code signing.
 
As for your sample... I really don't get it...
 
I read the "Blackberry Signature Tool Developer Guide 4.2.0" and it says this:
"The Blackberry IDE creates the following three files, located in the same folder as the project.jdp file (.cod, .csl, .cso)".
I got the .cod and .cso file... but not the .csl.
 
It also says this:
"When you use the Blackberry IDE to compile your application, the Blackberry IDE automatically generates the .csl file".
Which doesn't seem to be what happens on my side.

 

Nevertheless, I tried double-clicking on my .cod file and then I saw the Signature Tool window and I was able to request a signature successfully.  I tried it on a real Blackberry device... and my application is able to run on startup without any problem.

 

I just don't know why I can't start it from the "Build" menu of my Blackberry JDE (nothing happens).

And when I try it from the BlackBerry JDE Component Package 4.2.1 and I click on "Request", I receive this:

"Unable to request signatures until this application has been registered with all signing authorities required".

 

At least, I can sign my application by double-clicking on the .cod file directly (even if I don't actually have a .csl file).

 

Thanks!

Message Edited by canamgroup on 08-06-2008 03:45 PM
Please use plain text.
Administrator
MSohm
Posts: 14,362
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: Need help regarding code signing.

Please ensure that you have an active project when you select Request Signatures from the Build menu.  The SignatureTool only signs active projects, so if no projects are active, nothing will happen.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
canamgroup
Posts: 117
Registered: ‎07-16-2008
My Device: Not Specified

Re: Need help regarding code signing.

Well... that was it!

 

Thanks!

Please use plain text.