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

Native Development

Reply
Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
Accepted Solution

Authenticate using certificate

I have a certificate that i'd like to use to authenticate a network connection.

The certifcate was successfully installed on the Z10 using a mail attachment.

Would I have to use QSslCertificate and a local file to add the certificate to the auth process? Or can i access the locally installed cert?

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Authenticate using certificate

First step would be to get a self-signed server certificate working.
After installing the root certificate i can open the server in the work browser without issue. The private browser shows that the connection is not trusted and allows me to add an exception.

The application, however, does not work in both the private and the work context, i get a QSslError "The root certificate of the certificate chain is self-signed, and untrusted"
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: Authenticate using certificate

May be utilize this ignoreSslErrors() ?

I am pretty sure you saw https://developer.blackberry.com/cascades/reference/qsslsocket.html#details just checking -)

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Authenticate using certificate

yes, i can use ignoreSslErrors and it works fine, but that is kind of a overkill solution that creates security issues.

Basically i wanted to know if i can access the certificate store of the device.
My colleague went to an expert on BBLive and got the information that this is not possible and we would have to create our own certificate management using setLocalCertificate.

Not a very comfortable API, even worse than java BB OS.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter