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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
New Developer
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

BlackBerry Development Advisor
Posts: 15,885
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
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.
New Developer
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

BlackBerry Development Advisor
Posts: 15,885
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
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.
New Developer
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.

New Developer
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?

 

New Developer
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.

 

 

    

Contributor
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

 

 

Contributor
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.