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
Contributor
Posts: 44
Registered: ‎01-12-2011
My Device: Not Specified

ControllledAccessException while database encryption and protection

Hi

 

I am trying to encrypt and protect SQLite database file. The device I am using is registered with Blackberry Enterprise Server and Content Protection is also on. I am doing the following.

 

1. Creating the database using openOrCreate

2. Closing the database

3. Trying to encrypt and protect the database with the public key generated by Signing Authority Tool

 

I have properly signed the .cod file and application is running and step 1 and 2 are also working, but at the step 3 it throws the ControlledAccessException

 

I tried the same with SQLiteDemo given in Blackberry Samples on a device which is not registered with BES. Same problem is there. What could be the reason ?

 

Please suggest.

Highlighted
Contributor
Posts: 44
Registered: ‎01-12-2011
My Device: Not Specified

Re: ControllledAccessException while database encryption and protection

It is throwing exception at the following line of SQLiteDemo

 

DatabaseFactory.encrypt(uri,new DatabaseSecurityOptions(codeSigningKey));