Blackberry的签名申请过程及环境搭建

 

一、概述

Blackberry的开发中,如果您的应用程序使用了受控API,在加载到Blackberry智能手机之前,必须使用RIM提供的签名密钥对其进行签名,签名所用的key需要向RIM申请。本文档介绍RIM签名的申请过程及在公司共用一个签名情况下的环境搭建。

注意:仅当要在Blackberry智能手机上运行应用程序时,才需要对应用程序进行注册和签名。使用Blackberry智能手机模拟器运行应用程序时不需要对其进行签名。

二、签名申请

         要注册以获得BlackBerry运行时、应用程序和加密API,您需要填写这一Web表单。注册完成后,您将会通过电子邮件收到一系列密钥和相关安装说明,可用于使用BlackBerry签名工具对您的应用程序进行签名。完成注册流程需要提供有效的信用卡,将收取管理费20美元。

注意:通常,密钥会在提交必要表单后的48小时内发送到您的电子邮箱,但有时这一过程也会花费长达10个工作日的时间。中国申请的签名,一般需要510个工作日的时间。因为密钥会作为附件发送到邮箱,因此所使用的邮箱需要避免将该邮件作为垃圾邮件过滤或者自动删除附件。

签名申请前请准备:

1)  接收密钥的邮箱;

2)  具有美元消费功能的信用卡(国内的信用卡,我使用的是浦发银行的WOW卡,无密码消费)

签名申请的URL为:http://www.blackberry.com/go/codesigning(在中国境内访问可能会比较慢,需要有耐心)

需要填写以下表单1

 

 

对于中国的姓名,一般来说,first name是名,last name是姓,这个对签名的申请不是关键。接下来的company填写公司的英文名称,Email填写要接收密钥的邮箱(我用的是163的免费邮箱),phone填写个人的电话号码,Addresscity作为公司的话,填写公司的地址,province一般保持原样,country选择china(选项由于网络显示会比较慢),postal/zip code填写邮政编码,Quantity不需要填写。

接下来还要填写第二个表单2

 

PIN是指接收到的密钥的密码,10位数字,请牢记该密码,在后续接收到RIM的密钥后会用到。接下去关于YES/NO的选项是关于RIM引用加密API相关,可以进一步了解,一般选择NO就可以。

再接下去是信用卡信息,注意要填写正确,CardHolder Name信用卡持有人的姓名是指信用卡正面的英文名。CardHolder Phone指信用卡持有人的电话,一般直接填写个人的电话号码即可,CardHolder Email指信用卡持有人的Email,可以和上面表单一样,Credit Card Type信用卡的类型,信用卡正面可以找到;Credit Card Number信用卡号码,Expiration Date信用卡过期时间,在信用正面可以找到,Credit Card  security Number信用卡安全号只信用卡背面的三位数字。如果对信用卡各项内容不清楚,可以从发卡行的网站或者银行信用卡电话寻求帮助。

填写提交之后,会出现一个总结性的页面,在这个页面要求用户确认,最好拷贝或者记录各项信息,页面下面有最终的提交按钮,按下之后将不可撤销。在提交之后,一般国内的信用卡消费美元会给你电话确认(如果出现这个,申请成功的可能性就会很大)。

注意:在申请成功提交之后,会出现$30的信用卡交易,RIM的回答如下:

the initial $30 charge is a holding fee placed by the credit card company to verify that the funds are available for the transaction, this amount is higher than the listed $20 fee to account for currency changes, taxes etc. This is a temporary value and will not remain on your bill, the actual amount for the keys is $20 US.

大概意思是$30类似于在用信用卡入住酒店时的冻结资金,实际金额在成交之后按照$20结算。

到此,申请的过程完结,接下去就是漫长的等待,注意,5-10天是指工作日,而非自然日。

三、环境搭建

         在成功申请后,RIM会发若干封邮件,其中至少有三封包含附件的邮件,三个附件分别为:

client-RBB-XXXXXXXXXX.csi

client-RCR-XXXXXXXXXX.csi

client-RRT-XXXXXXXXXX.csi

其中XXXXXXXXXX是指申请签名的client ID。三个附件为RBB, RRT and RCR keys.

每封邮件都介绍有附件的使用方法。内容如下:

The following attachment will allow the BlackBerry SignatureTool to register with the Signing Authority. Please ensure that the BlackBerry development tool of choice has been installed onto the workstation that will be used to sign your BlackBerry applications.

 

To register the attachment, please follow the instructions below:

 

If you plan to use both the BlackBerry JDE and BlackBerry JDE Plug-in for Eclipse install the signature keys using the BlackBerry JDE.  This should allow you to sign from either tool.

 

BlackBerry JDE or BlackBerry JDE Component Package Users:

1)   Double-click on the attachment.

2)   If a dialog box appears that states that a private key cannot be found, complete steps 3 through 6 before you continue. Otherwise, proceed to step 7.

3)   Click "Yes" to create a new key pair file.

4)   Type a password for your private key of at least 8 characters, and type it again to confirm.  This is your private key password, which protects your private key. Please remember this password as you will be prompted for it each time signing is attempted or a signature key is installed.

5)   Click "Ok"

6)   Move your mouse to generate date for a new private key.

7)   In the "Registration PIN" field, type the PIN number that you supplied on the signature key order form.

8)   In the Private Key password field, type the password created in step 4.

9)   Click "Register".

10) Click "Exit".

11) Repeat this process for the other .csi files.

 

BlackBerry JDE Plug-in for Eclipse Users:

1)   Save all 3 .csi files in the same directory (each one will be sent in a separate email message).

2)   Start Eclipse.

3)   Click on the BlackBerry menu and choose Install Signature Keys.

4)    Select one of the 3 .csi files saved in step 1 and click Open.

5)   Click "Yes" to create a new key pair file.

6)   Type a password for your private key of at least 8 characters, and type it again to confirm.  This is your private key password, which protects your private key. Please remember this password as you will be prompted for it each time signing is attempted or a signature key is installed.

7)   Move your mouse to generate date for a new private key.

8)   In the Registration PIN" field, type the PIN number that you supplied on the signature key order form.

9)  In the Private Key password field, type the password created in step 6.

10) Click "Register".

11) Click "Exit".

12) Repeat this process for the other csi files.

 

BlackBerry Widget SDK, BlackBerry Web Development Plug-in for Eclipse or BlackBerry Plug-in for Microsoft Visual Studio Users:

1) At the command prompt, navigate to the bin folder within the BlackBerry Widget Packager installation directory.  Default directories are:

BlackBerry Widget SDK and BlackBerry Plug-in for Microsoft Visual Studio:

C:/Program Files/Research In Motion/BlackBerry Widget Packager/bin

 BlackBerry Web Development Plug-in for Eclipse:

<Eclipse Installation>/plugins/ net.rim.browser.tools.wcpc/ wcpc/bin

C:/Program Files/Research In Motion/BlackBerry Widget Packager/bin

2) Type the following command, including the full path of the .csi file:

java -jar SignatureTool.jar <.csi file path>

3)  If a dialog that a private key cannot be found appears, perform the following actions:

a. Click Yes.

b. Type a password for the private key.

c. Type the password to confirm it.

d. Click OK.

e. Move the mouse to generate data for the new private key.

4) In the Registration PIN field, type the PIN that RIM. provided.

5) In the Private Key Password field, type a password of at least eight characters. This is the private key password.

6) Click Register.

7) Click Exit.

 

 

Important information for all users:

Note: All 3 keys (RBB, RCR, RRT) received need to be installed on the same PC.  The same password must be specified for all keys on the same PC.  You should receive each key/.csi file in a separate email message.

对于单个开发人员适用独立的key按照上述步骤进行操作就可以了,如果团队的人员共同使用一个签名,就需要搭建公用的环境。下面介绍本人搭建的签名环境。

1)  准备一台公用的机器或者服务器,操作系统winxp或者win2003都可以,能够连接到公网;

2)  安装JDK环境,我使用的是1.6sun  JDK

3)  建立目录,如C:/BBKey

4)  将三封邮件的附件拷贝到上一步建立的目录;

5)  Blackberry开发环境下的bin目录找到SignatureTool.jar,拷贝到第三步所建立的目录;

6)  在命令行窗口,切换到刚建立的目录,运行命令java –calsspath ./ SignatureTool.jar  -jar SignatureTool.jar  ./client-RBB-XXXXXXXXXX.csi

出现签名工具的界面,提示私有密钥不存在的提示,确认后要求输入PIN码,该处的PIN码就是在申请时填写的,一定要对应上,错误次数超过5次,将永久失效;还要输入至少8位的私钥的密码,这个密码是以后应用签名时需要输入的密码。提交后,如果网络验证成功,在当前目录生成sigtool.csksigtool.db文件

7)  对于其它两个附件,同样运行java –calsspath ./ SignatureTool.jar  -jar SignatureTool.jar  ./client-RCR-XXXXXXXXXX.csijava –calsspath ./ SignatureTool.jar  -jar SignatureTool.jar  ./client-RRT-XXXXXXXXXX.csi,按照提示完成提交。注意在三次运行命令时输入的至少8位的私钥密码要想同。

8)  成功后,RIM会发邮件给你,注意备份sigtool.csksigtool.db文件。

9)  在第三步建立的目录下,建批处理文件sigtool.bat,内容如下:

C:

cd c:/BBKey

java –classpath ./ SignatureTool.jar  -jar  SignatureTool.jar %1

内容可以根据需要修改。

10)              拷贝要签名的应用.cod.csl文件到该机器上的同一目录,点击cod文件,选择打开方式为刚才建立的批处理文件sigtool.bat。系统将调用签名工具,显示要签名的项,如下图:

 

   点击request按钮,输入在前面输入的至少8位的私钥密码,完成签名过程。每一次成功签名之后,RIM会发邮件给申请签名的邮箱。其中有提示剩余签名次数递减的信息,一般来说该数字非常大,大概2147483647,不用担心。

11)              以后每次要签名应用的时候,就拷贝codcsl文件到该机器,打开cod文件完成签名。

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值