Set up for signing

If you want to test your application in the BlackBerry PlayBook OS without signing it, you can create and install a debug token. For more information about debug tokens, see Deploy to a device.

Configure your computer to sign applications

The steps in this section apply to first-time configuration for signing and for requesting debug tokens. You only need to do them once.

If you are upgrading the BlackBerry WebWorks SDK, perform the steps outlined in the After an SDK upgrade section.

  1. Request permission to sign your BlackBerry PlayBook app by completing the web form at https://www.blackberry.com/SignedKeys.

    Remember the Registration PIN you provide. You will need it to complete the steps below.

  2. After your application is accepted, you will receive two .csj registration files by email. Each file arrives in a separate email message with information about the purpose of the file attached. Save these files to a location on your computer.
    • client-RDK-xxxxxx.csj - This is the file that you use to sign your apps and publish to the BlackBerry World storefront.
    • client-PBDT-xxxxxx.csj - This file is used to generate a debug token that you can use to test your app on a device.
    These files are used to install code signing keys. They can only be used once.
  3. Register with the signing authority using your .csj registration files for application signing. From the \bbwp\blackberry-tablet-sdk\bin folder located in the BlackBerry WebWorks SDK installation folder, run the blackberry-signer command to enroll with the signing authority server:
    blackberry-signer -register -csjpin <csj pin> 
        -storepass <KeystorePassword> <client-RDK-xxxxxx.csj file> 
        <client-PBDT-xxxxx.csj file>
    where
    • <csj pin> is the Registration PIN you specified on the web form when you requested code signing keys
    • <KeystorePassword> is a password that you specify for the keystore
    • <client-RDK-xxxxxx.csj file> is the app signing .csj file sent by email after you registered
    • <client-PBDT-xxxxx.csj file> is the debug token .csj file sent by email after you registered

This command creates the following files: author.p12, barsigner.csk, and barsigner.db.

You will need the keystore password every time you sign an app or create a debug token.

Example

When we filled out the code signing registration form, the Registration PIN that we specified was 123456. We saved the CSJ files that we received via email in the C:\keys folder. We're using Windows 7, so we open a command prompt, and navigate to the C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK for TabletOS <version>\bbwp\blackberry-tablet-sdk\bin folder. The keystore password is something new we have to create, so we chose the password rocket11. At the command prompt, here's the command that we type to register our signing keys:

blackberry-signer –register –csjpin 123456 –storepass rocket11 C:\keys\client-RDK-488888888.csj C:\keys\client-PBDT-488888888.csj

After running this command, the author.p12, barsigner.csk, and barsigner.db files are created in the folder C:\Users\myname\AppData\Local\Research In Motion with a keystore password of rocket11. When we sign our applications or create debug tokens, we'll use rocket11 as the keystore password.

Backing up your files

The CSJ files that you used to install your code signing keys can only be used once. They are disabled after a successful installation, which makes it important to back up your code signing keys after they have been installed. Code signing keys can be restored to the original computer that they were installed to or restored to another computer. You can also use this information to transfer your code signing keys to multiple computers and sign from any of them.

The files that need to be backed up are: author.p12, barsigner.csk and barsigner.db. The barsigner files are located in the directories outlined below. These are stored in a central location in the user's profile directory and used by all BlackBerry PlayBook OS development tools. Their location will vary based on the operating system you use. To restore your code signing keys, copy the files back to the directory outlined below.
  • Windows XP: %HOMEPATH%\Local Settings\Application Data\Research In Motion
  • Windows Vista and Windows 7: %HOMEPATH%\AppData\Local\Research In Motion
  • Mac OS: ~/Library/Research In Motion
  • UNIX or Linux: ~/.rim

By default, %HOMEPATH% is C:\Documents and Settings\<User> on Windows XP and C:\Users on Windows Vista and Windows 7.

After an SDK upgrade

If you upgraded the BlackBerry WebWorks SDK and you want to use the sigtool.p12 file created by a previous version, rename this file to author.p12 and move it from the BlackBerry WebWorks SDK bbwp\bin folder to the appropriate common location, depending on your environment.

  • Windows XP: %HOMEPATH%\Local Settings\Application Data\Research In Motion
  • Windows Vista and Windows 7: %HOMEPATH%\AppData\Local\Research In Motion
  • Mac OS: ~/Library/Research In Motion
  • UNIX or Linux: ~/.rim

Last modified: 2013-10-24