Hi All,
I’m struggling with ssl pinning in our ionic 2 application. I tried with sslchecker which works fine in android with SHA 256 fingerprints. but the same is not working in iOS. So we installed the previous version of this plugin and used SHA1 fingerprints, which is working fine in both android and iOS.
But we would like to use only SHA256 fingerprints as SHA1 is absolete.
I also tried using cordova-plugin-advanced-http plugin and placed .cer file in www/sertificates folder. But this always returns the success callback even when i use a wrong certificate or no certificate.
Here is my code:
import { HTTP } from ‘@ionic-native/http’;
constructor(public ihttp:HTTP) {
}
postRequest()
{
this.ihttp.setSSLCertMode(‘pinned’).then(success=>{
console.log(“ssl connection secured”,success);
this.post(params);
},(err)=>{
console.log("ssl connection not secured",err)
});
}
Any help would be highly appreciated.
Thanks,
Aruna.