BlackBerry開發(fā)代碼簽名工具申請及安裝介紹
本文和大家重點(diǎn)討論一下Black Berry開發(fā)代碼簽名工具申請及安裝介紹,出于安全和出口控制的原因,Research In Motion(RIM)必須跟蹤一些敏感Black Berry®應(yīng)用程序編程接口(API)的使用情況。
Black Berry開發(fā)代碼簽名工具申請及安裝介紹
Black Berry開發(fā)背景
出于安全和出口控制的原因,Research In Motion(RIM)必須跟蹤一些敏感Black Berry®應(yīng)用程序編程接口(API)的使用情況。敏感類別或方法在API參考文檔中使用“鎖定”圖標(biāo)或“Signed”字樣表示。如果您在應(yīng)用程序中使用了這些受控類,在您將應(yīng)用程序.cod文件加載到Black Berry智能手機(jī)之前,您的應(yīng)用程序必須使用簽名工具(由RIM提供)進(jìn)行簽名。完成注冊流程需要提供有效的信用卡,將收取管理費(fèi)20美元。官網(wǎng)介紹:http://cn.blackberry.com/developers/javaappdev/codekeys.jsp
一、概述
在Black Berry開發(fā)中,如果您的應(yīng)用程序使用了受控API,在加載到Blackberry智能手機(jī)之前,必須使用RIM提供的簽名密鑰對其進(jìn)行簽名,簽名所用的key需要向RIM申請。本文檔介紹RIM簽名的申請過程及在公司共用一個(gè)簽名情況下的環(huán)境搭建。
注意:僅當(dāng)要在BlackBerry智能手機(jī)上運(yùn)行應(yīng)用程序時(shí),才需要對應(yīng)用程序進(jìn)行注冊和簽名。使用Blackberry智能手機(jī)模擬器運(yùn)行應(yīng)用程序時(shí)不需要對其進(jìn)行簽名。
二、簽名申請
要注冊以獲得BlackBerry運(yùn)行時(shí)、應(yīng)用程序和加密API,您需要填寫這一Web表單。注冊完成后,您將會(huì)通過電子郵件收到一系列密鑰和相關(guān)安裝說明,可用于使用BlackBerry簽名工具對您的應(yīng)用程序進(jìn)行簽名。完成注冊流程需要提供有效的信用卡,將收取管理費(fèi)20美元。
注意:通常,密鑰會(huì)在提交必要表單后的48小時(shí)內(nèi)發(fā)送到您的電子郵箱,但有時(shí)這一過程也會(huì)花費(fèi)長達(dá)10個(gè)工作日的時(shí)間。中國申請的簽名,一般需要5到10個(gè)工作日的時(shí)間。因?yàn)槊荑€會(huì)作為附件發(fā)送到郵箱,因此所使用的郵箱需要避免將該郵件作為垃圾郵件過濾或者自動(dòng)刪除附件。
BlackBerry開發(fā)簽名申請前請準(zhǔn)備:
1)接收密鑰的郵箱
2)具有美元消費(fèi)功能的信用卡(國內(nèi)的信用卡,Vista和Master)
簽名申請的URL為:https://www.blackberry.com/SignedKeys/
需要填寫以下表單1:
對于中國的姓名,一般來說,firstname是名,lastname是姓,這個(gè)對簽名的申請不是關(guān)鍵。接下來的company填寫公司的英文名稱,Email填寫要接收密鑰的郵箱,phone填寫個(gè)人的電話號碼,Address、city作為公司的話,填寫公司的地址,province一般保持原樣,country選擇china,postal/zipcode填寫郵政編碼,Quantity不需要填寫。
接下來填寫第二個(gè)表單2:
PIN是指自己定義的密碼,10位數(shù)字,請牢記該密碼,在后續(xù)接收到RIM的密鑰后會(huì)用到。接下去關(guān)于YES/NO的選項(xiàng)是關(guān)于RIM引用加密API相關(guān),可以進(jìn)一步了解,一般選擇NO就可以。
再接下去是信用卡信息,注意要填寫正確,CardHolderName信用卡持有人的姓名是指信用卡正面的英文名。CardHolderPhone指信用卡持有人的電話,一般直接填寫個(gè)人的電話號碼即可,CardHolderEmail指信用卡持有人的Email,可以和上面表單一樣,CreditCardType信用卡的類型,信用卡正面可以找到;CreditCardNumber信用卡號碼,ExpirationDate信用卡過期時(shí)間,在信用正面可以找到,CreditCardsecurityNumber信用卡安全號只信用卡背面的三位數(shù)字。如果對信用卡各項(xiàng)內(nèi)容不清楚,可以從發(fā)卡行的網(wǎng)站或者銀行信用卡電話尋求幫助。
填寫提交之后,會(huì)出現(xiàn)一個(gè)總結(jié)性的頁面,在這個(gè)頁面要求用戶確認(rèn),最好拷貝或者記錄各項(xiàng)信息,頁面下面有最終的提交按鈕,按下之后將不可撤銷。在提交之后,一般國內(nèi)的信用卡消費(fèi)美元會(huì)給你電話確認(rèn)(如果出現(xiàn)這個(gè),申請成功的可能性就會(huì)很大)。
注意:在申請成功提交之后,會(huì)出現(xiàn)$30的信用卡交易,RIM的回答如下:
theinitial$30chargeisaholdingfeeplacedbythecreditcardcompanytoverifythatthefundsareavailableforthetransaction,thisamountishigherthanthelisted$20feetoaccountforcurrencychanges,taxesetc.Thisisatemporaryvalueandwillnotremainonyourbill,theactualamountforthekeysis$20US.
大概意思是$30類似于在用信用卡入住酒店時(shí)的凍結(jié)資金,實(shí)際金額在成交之后按照$20結(jié)算。
到此,申請的過程完結(jié),接下去需要等待RIM答復(fù),注意,5-10天是指工作日,而非自然日。
三、BlackBerry開發(fā)簽名工具環(huán)境搭建
在成功申請后,RIM會(huì)發(fā)若干封郵件,其中至少有三封包含附件的郵件,三個(gè)附件分別為:
client-RBB-XXXXXXXXXX.csi
client-RCR-XXXXXXXXXX.csi
client-RRT-XXXXXXXXXX.csi
其中XXXXXXXXXX是指申請簽名的clientID。三個(gè)附件為RBB,RRTandRCRkeys.
每封郵件都介紹有附件的使用方法,按照里面的步驟安裝簽名就可以了。內(nèi)容如下:
- ThefollowingattachmentwillallowtheBlackBerrySignatureTooltoregisterwiththeSigningAuthority.
- PleaseensurethattheBlackBerrydevelopmenttoolofchoicehasbeeninstalledontotheworkstationthatwillbeusedtosignyourBlackBerryapplications.
- Toregistertheattachment,pleasefollowtheinstructionsbelow:
- IfyouplantouseboththeBlackBerryJDEandBlackBerryJDEPlug-inforEclipseinstallthesignaturekeysusingtheBlackBerryJDE.
- Thisshouldallowyoutosignfromeithertool.
- BlackBerryJDEorBlackBerryJDEComponentPackageUsers:
- 1)Double-clickontheattachment.
- 2)Ifadialogboxappearsthatstatesthataprivatekeycannotbefound,completesteps3through6beforeyoucontinue.Otherwise,proceedtostep7.
- 3)Click"Yes"tocreateanewkeypairfile.
- 4)Typeapasswordforyourprivatekeyofatleast8characters,andtypeitagaintoconfirm.Thisisyourprivatekeypassword,
- whichprotectsyourprivatekey.Pleaserememberthispasswordasyouwillbepromptedforiteachtimesigningisattemptedorasignaturekeyisinstalled.
- 5)Click"Ok"
- 6)Moveyourmousetogeneratedateforanewprivatekey.
- 7)Inthe"RegistrationPIN"field,typethePINnumberthatyousuppliedonthesignaturekeyorderform.
- 8)InthePrivateKeypasswordfield,typethepasswordcreatedinstep4.
- 9)Click"Register".
- 10)Click"Exit".
- 11)Repeatthisprocessfortheother.csifiles.
- BlackBerryJDEPlug-inforEclipseUsers:
- 1)Saveall3.csifilesinthesamedirectory(eachonewillbesentinaseparateemailmessage).
- 2)StartEclipse.
- 3)ClickontheBlackBerrymenuandchooseInstallSignatureKeys.
- 4)Selectoneofthe3.csifilessavedinstep1andclickOpen.
- 5)Click"Yes"tocreateanewkeypairfile.
- 6)Typeapasswordforyourprivatekeyofatleast8characters,andtypeitagaintoconfirm.
- Thisisyourprivatekeypassword,whichprotectsyourprivatekey.Pleaserememberthispasswordasyouwillbepromptedforiteachtimesigningisattemptedorasignaturekeyisinstalled.
- 7)Moveyourmousetogeneratedateforanewprivatekey.
- 8)IntheRegistrationPIN"field,typethePINnumberthatyousuppliedonthesignaturekeyorderform.
- 9)InthePrivateKeypasswordfield,typethepasswordcreatedinstep6.
- 10)Click"Register".
- 11)Click"Exit".
- 12)Repeatthisprocessfortheothercsifiles.
- BlackBerryWidgetSDK,BlackBerryWebDevelopmentPlug-inforEclipseorBlackBerryPlug-inforMicrosoftVisualStudioUsers:
- 1)Atthecommandprompt,navigatetothebinfolderwithintheBlackBerryWidgetPackagerinstallationdirectory.Defaultdirectoriesare:
- BlackBerryWidgetSDKandBlackBerryPlug-inforMicrosoftVisualStudio:
- C:\ProgramFiles\ResearchInMotion\BlackBerryWidgetPackager\binBlackBerryWebDevelopmentPlug-inforEclipse:
- <EclipseInstallation>\plugins\net.rim.browser.tools.wcpc\wcpc\binC:\ProgramFiles\ResearchInMotion\BlackBerryWidgetPackager\bin
- 2)Typethefollowingcommand,includingthefullpathofthe.csifile:
- java-jarSignatureTool.jar<.csifilepath>
- 3)Ifadialogthataprivatekeycannotbefoundappears,performthefollowingactions:
- a.ClickYes.
- b.Typeapasswordfortheprivatekey.
- c.Typethepasswordtoconfirmit.
- d.ClickOK.
- e.Movethemousetogeneratedataforthenewprivatekey.
- 4)IntheRegistrationPINfield,typethePINthatRIM.provided.
- 5)InthePrivateKeyPasswordfield,typeapasswordofatleasteightcharacters.Thisistheprivatekeypassword.
- 6)ClickRegister.
- 7)ClickExit.
- Importantinformationforallusers:
- Note:All3keys(RBB,RCR,RRT)receivedneedtobeinstalledonthesamePC.ThesamepasswordmustbespecifiedforallkeysonthesamePC.Youshouldreceiveeachkey/.csifileinaseparateemailmessage.
- ForfurtherinformationonBlackBerryControlledAPIsandsigningofapplications,pleaserefertotheBlackBerrySignatureToolDeveloperGuideversion4.2.0,foundatthefollowinglink:
- http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/8067/645045/8655/8656/1271077/BlackBerry_Signature_Tool_Developer_Guide.pdf?nodeid=1271325&vernum=0
- Pleasenote:Whenregisteringwiththesigningauthority,ensurethatyouhavecorrectlyenteredyourregistrationPINnumber.IfyouentertheincorrectPIN5times,yourkeyswillbedeactivated.
- Troubleshooting:
- IfyouarehavingdifficultyinstallingorregisteringyoursignaturekeyspleasechecktheSignatureKeyandCodesigningsectionoftheDeveloperKnowledgeBasefoundhere:http://www.blackberry.com/knowledgecenterpublic/livelink.exe?func=ll&objId=800989&objAction=browse&sort=name
- Ifyoucontinuetoexperienceissuespleasecontactdevsupport@rim.com.
- BestofluckwithyourdevelopmentandthankyouforyourinterestinBlackBerry.
- Regards,BlackBerryApplicationDevelopmentSupportTeamhttp://www.blackberrydeveloper.com
- DateIssued:Tuesday,March16,2010@14:54:15KeysIssued:RRT
- Recipient:youremail@rim.com
- <<client-RRT-207634362.csi>>
- ---------------------------------------------------------------------
- Thistransmission(includinganyattachments)maycontainconfidentialinformation,privilegedmaterial(includingmaterialprotectedbythesolicitor-clientorotherapplicableprivileges),orconstitutenon-publicinformation.Anyuseofthisinformationbyanyoneotherthantheintendedrecipientisprohibited.Ifyouhavereceivedthistransmissioninerror,
- pleaseimmediatelyreplytothesenderanddeletethisinformationfromyoursystem.
- Use,dissemination,distribution,orreproductionofthistransmissionbyunintendedrecipientsisnotauthorizedandmaybeunlawful.
注意事項(xiàng):
1.如果希望簽名工具能夠同時(shí)支持BlackBerryJDE和BlackBerryJavaPluginforEclipse,需要先為BlackBerryJDE安裝
2.每次要簽名應(yīng)用的時(shí)候,就拷貝cod和csl文件到該機(jī)器,打開cod文件完成簽名。
3.如果需要卸載JDE重新安裝,一定要預(yù)先備份以下三個(gè)文件
【編輯推薦】
- BlackBerry開發(fā)中Windows+eclipse環(huán)境配置及Helloworld
- 九步實(shí)現(xiàn)BlackBerry開發(fā)程序發(fā)布應(yīng)用到app world
- BlackBerry開發(fā)中七步實(shí)現(xiàn)創(chuàng)建app world賬號
- BlackBerry開發(fā)環(huán)境中javaloader使用詳解
- 黑莓開發(fā)中黑莓手機(jī)程序訪問網(wǎng)絡(luò)能走代理服務(wù)器的三種方式