Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Certificate Pinning doesn't work

$
0
0

I'm trying to implement certificate pinning. However, after implementing the certificate pinning. The app won't connect to the server and it doesn't throws any error(onerror function) as well.

One more thing, my server has links like "https://mylink.com/authorize", "https://mylink.com/getData" for authorization and getting data.

Here is a snippet how I created it. Method variable has a method ('GET'/'POST') and path has the url I'm calling. Usually it is either "https://mylink.com/authorize" or "https://mylink.com/getData"

var https = require('appcelerator.https'); var securityManager = https.createX509CertificatePinningSecurityManager([ { url: "https://mylink.com", serverCertificate: "certificate2.pem" }, { url: "https://mylink22.com", serverCertificate: "certificate.pem" } ]);

var xhr = Titanium.Network.createHTTPClient({ timeout: 30000, validatesSecureCertificate: true, securityManager: securityManager });

xhr.open(method, path); xhr.send();


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>