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
New Developer
pankaj
Posts: 7
Registered: ‎03-09-2009
My Device: Not Specified

how to add certificate to trusted key store of blackberry ??

hi,

i am trying to devlop an app which tries to installs certs OTA for blackberry.

 

i used keystore.set method obtaining a ticket of device key store and added certificates to device. but even the root certificate is showing a red cross mark. i do not want to go and explictly trust the certificate from main menu. is there any way i can add the root certificate to trusted key store or mark it trusted from the code itself..

i need this by end of wednesday..can anyone help...

 

Thanks

Pankaj soni

Please use plain text.
Administrator
MSohm
Posts: 14,444
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: how to add certificate to trusted key store of blackberry ??

Applications can programmatically add certificates to the key store.  However, it is up to the user to mark them as trusted.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
pankaj
Posts: 7
Registered: ‎03-09-2009
My Device: Not Specified

Re: how to add certificate to trusted key store of blackberry ??

Thanks for the reply,i wasted alot of time getting it to be trusted internally from code but from your repy it seems that this has been bloacked to third party apps which is a good security measure.

 

NOW, after trusting the root certificate explicitly i navigate to the keystore, there certificate is marked with a question mark instead of a green check. I click on fetch status, it errors out saying internet provider's error.

 

Is this a hindrance to my application and why it is not able to read certificate status completely.

 

Any thoughts??

 

Pankaj Soni

Please use plain text.
Administrator
MSohm
Posts: 14,444
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: how to add certificate to trusted key store of blackberry ??

How was the certificate installed?  Do you only see this behaviour when programmatically installing the certificate or does it occur in all situations?  Is this a public certificate I could test? What BlackBerry Smartphone model and BlackBerry handheld software version are you testing on?  You can find this under Options, About on the BlackBerry Smartphone.  Is the BlackBerry handheld on a BlackBerry Enterprise Server?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
pankaj
Posts: 7
Registered: ‎03-09-2009
My Device: Not Specified

Re: how to add certificate to trusted key store of blackberry ??

No, the certificate is a is my own gernerated by using open ssl and bb api's. Problem only occurs when my application tried to install the certificate.

 

Now, when i click on fetch status button it fetches status and green check comes, for that i needed to modify my server to host crl. But isnt thier any api which can mimick this fetch status button's job. i want to avoid excess steps for bb users.

Please use plain text.
New Developer
pankaj
Posts: 7
Registered: ‎03-09-2009
My Device: Not Specified

Re: how to add certificate to trusted key store of blackberry ??

if i place the certificate status as good programatically it says revocation status is:

 

Good

if i use fetch status it says:
 
Good on Wed, Mar 11, 2009 4:38:44 PM
 
why this difference?

 

Please use plain text.
New Developer
sougatasen
Posts: 18
Registered: ‎04-29-2009
My Device: Not Specified

Re: how to add certificate to trusted key store of blackberry ??

Hi Pankaj,

                   Can you give me some pointers towards a sample code to Install Certificates Programmatically in Blackberry using the keystore class ??

 

Thanks.

 

 

    

Please use plain text.
Contributor
dcdel
Posts: 13
Registered: ‎06-18-2009
My Device: Not Specified

Re: how to add certificate to trusted key store of blackberry ??

Hi Mark,

 

I am having the same issue,

 

1 Need to update the certificate status explicitly ( that is fine as you replied.)

2 After explicitly trusting the certificate, it shows me a ? with Orange color (for sure its not GREEN).

3 when i visit my website, the browser is not able to find the client certificate when asked. it return a dialog saying "the connection requested a client certificate for authentication. one could not be found on the device would you like to continue?" with options yes, no and dont ask again.

 

I am using the blackberry curve 8520 os version 4.6.1.314(Platform 4.2.0.135).

 

The certificate i installed using Blackberry Desktop manager "Sync Certricates" option and its in .pfx format.

 

guys please help me on this critical issue.

 

thanks

DC

 

 

Please use plain text.
Contributor
dcdel
Posts: 13
Registered: ‎06-18-2009
My Device: Not Specified

Re: how to add certificate to trusted key store of blackberry ??

I solved this issue by installing the root certificate and a intermediate certificate. as they were self signed..now they are picked up by the HTTPS connection while searching for the client certificate.

Please use plain text.