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
Posts: 239
Registered: ‎07-26-2010
My Device: Z10
My Carrier: Telkomsel
Accepted Solution

Confusion about CodeSigningKey class

I like to try using ExtendedFileConnection and setControlledAccess(). Thus, the CodeSigningKey class is required.

The document says:

Parameters:
        signerId - ID of the Signing Authority (typically this is the filename of the key file). Note that this argument must not exceed four characters in length, otherwise an IllegalArgumentException will be thrown.
        publicKey - Public key data.
        description - Description or name of the Signing Authority


http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/system/CodeSigningKey.html

 

I assume that publicKey can be found in sigtool.csk:

#File containing the secure storage of the private and public keys.
#Wed Jul 11 09:36:55 ICT 2012
Salt=xxxxxxxxxx
PrivateKey=xxxxxxxxxxxxxxxxxxxx

 

Salt must be publicKey. Am I correct?

 

Next is, how do I find the signerID and description?

I didn't find signerID in sigtool files, but in the *.csi files. Which one to use: RBB, RCR, or RRT?

And what about description? Is is the name of the company I used when applying for the signing key?

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Confusion about CodeSigningKey class

you encrypt files with your own signing key, this includes setting up a signing server of your own.
i don't find the exact description in the dev guide right now, but in the API you'll find references to the "ACME" key, this means your own key.
("ACME" is a cultural reference some non-cartoon-watching people of non-US origin may not be aware of, see http://en.wikipedia.org/wiki/Acme_Corporation )
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Developer
Posts: 36
Registered: ‎12-28-2010
My Device: Red Z10, DevAlpha C, Bold 9900, PlayBook
My Carrier: Sprint, AT&T

Re: Confusion about CodeSigningKey class

ACME should be edited out.

Onward to BBJam Asia 2013!
twitter/github: @georgemck http://www.bbdevla.com
Developer
Posts: 239
Registered: ‎07-26-2010
My Device: Z10
My Carrier: Telkomsel

Re: Confusion about CodeSigningKey class

Hmm that's kinda weird.

Than how do I set my own signing server up?

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Confusion about CodeSigningKey class

this could help:
http://docs.blackberry.com/en/developers/subcategories/?userType=21&category=BlackBerry+Signing+Auth...

https://developer.blackberry.com/java/documentation/persistentstore_security_1981762_11.html
(includes sample code)
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Confusion about CodeSigningKey class

i also found the KB article covering this:
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/1295814/How_to...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 239
Registered: ‎07-26-2010
My Device: Z10
My Carrier: Telkomsel

Re: Confusion about CodeSigningKey class

Many thanks. I'll take a look at those KBs.

 

BTW, even though the KB says "The Signing Authority tool runs only on Windows 2000.", actually I can run in on Win 7.

So I need to sign my app only using my private key, and not the one from RIM?

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Confusion about CodeSigningKey class

you sign it with both, as the RIM classes need the usual signing.
The KB is kind of ancient and was not updated i guess, if it runs on windows 7 that's fine.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: Confusion about CodeSigningKey class

Just some helpful information. Though the Signing Authority will run o Windows 7, it won't start automatically because it requires an interactive logon. There is a setting you can change on the services so that it prompts you to start the service each time your pc starts. This is only if you have it set to run on startup.
Developer
Posts: 239
Registered: ‎07-26-2010
My Device: Z10
My Carrier: Telkomsel

Re: Confusion about CodeSigningKey class

Noted.

 

Anyway, I just take a look at this:

http://supportforums.blackberry.com/t5/Java-Development/Problem-about-ExtendedFileConnection-setCont...

 

When I run the "BlackBerry Private Key Adminstration Tool", I can see my name, ID, public key, and signature algorithm parameters on it. But it is stored somewhere? The data directory is empty.