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

Web and WebWorks Development

Reply
New Contributor
mikenigh
Posts: 4
Registered: ‎12-12-2012
My Device: BB10

HTTPS Self Signed Certificate ajax issue solution

[ Edited ]

This solution is from a RIM employee. This may be the only place on the internet this work around is known... WIthout this there is no way to make an ajax call etc to an https location that has a self signed certificate.

 

The following are instructions for how to implement the workaround.
1. Open the SDK folder and find the Framework/lib/webview.js file.
2. Insert at line 94 inside the creation call back the following:
_webviewObj.addKnownSSLCertificate('example.site.org', JSON.stringify({certificateType:"TypeWarning", trusted:1, certificates:[{signature:"7f08f14f04a392a0218d6aab9430b4d4b9f123d1"}]}));

3. Re-package the application using your WebWorks SDK.
4. App should now accept cross site XHR requests to the domain with
'untrusted' certificate.
 
...
 
To get the "signature" go to the site with a normal browser (like IE) and save the certificate as a cer file.
 
Then do this command (in linux?)
openssl x509 -inform DER -in ldcigm2.wdf.sap.corp.cer -noout -fingerprint
 
and the fingerprint should be what you put in for the signature...
 
This info is directly from a RIM developer and it worked for us. This only works on the BB10 though, for the playbook fix this is the current status -
 
"If you are encountering this issue running WebWorks on the Playbook then
that is a separate issue entirely one that can be fixed in theory using
the same method, but would need different syntax, to use the AIR API."
 
"Here is a
link to the documentation on the AIR web view you speak of:
-http://www.blackberry.com/developers/docs/airapi/1.0.0/qnx/media/QNXStageW
ebView.html
"