10-29-2012 07:41 AM
I am trying to do SQLite database ecryption and protection in my project. But I am having a difficult time in doing it. I am using the code given in the SQLite demo. But the real problem, for now, is to sign my .cod file.
This is what I have tried.
1. I created a public/private key pair using Blackberry Signing Authority Tool.
2. Added the .key file in the project in the src folder.
3. Refreshed the project.
4. Packaged the project.
5. Tried different combinations of signing the file as below
i) Signed my file only with Blackberry Signing Authority Tool. It was successfully signed but on device while running the app, I got an exception that "your application is trying to access the secured APIs".
ii) I signed the app with signature tool in Eclipse. It ran successfully on device but it throws ControlledAccessException while encrypting the database at the following line.
iii) Signed first with signature tool and then with blackberry signing authority tool. App runs but the same problem as in (ii).
Please suggest where I am doing wrong or please explain the procedure to ecrypt the database. Please do not give the link of the BB docs. I am following that only but not getting successfull.
10-29-2012 01:03 PM
I recommend to do all signing in once place, using the SignatureTool in the BlackBerry Java Plug-in for Eclipse.
To do this create an account for yourself in your BlackBerry Signing Authority Tool. This will trigger the email of a csi file to you, similar to when you sign up for RIM code signing keys. You can then install that in Eclipse and sign everything at once.
11-01-2012 04:45 AM
I tried to email the .csi file. but the tool does not allow me to do so. Every time it says that enter right SMTP server name. However, the name is correct. But if I have to sign everything at one place, can't I do it just with the Signing authority tool or with Signature tool only ?
11-01-2012 09:33 AM
The Signing Authority tool is only able to sign with the key you created, not the RIM keys. SignatureTool can sign with both.
Make sure you enter a fully qualified mail server name (server.domain.com) for your SMTP server, even if it is local.