Always shows Connection_not_secure
mohammadchehab opened this issue · comments
var fingerprint = 'B5 69 A5 97 AD 73 68 3A EB F4 D9 2F BD 84 6C 81 41 A0 1B 16';
var server = 'https://www.google.com/';
window.plugins.sslCertificateChecker.check(
successCallback,
errorCallback,
server,
fingerprint);
function successCallback(message) {
alert(message);
// Message is always: CONNECTION_SECURE.
// Now do something with the trusted server.
}
function errorCallback(message) {
alert(message);
if (message == "CONNECTION_NOT_SECURE") {
} else if (message.indexOf("CONNECTION_FAILED") > -1) {
// There was no connection (yet). Internet may be down. Try again (a few times) after a little timeout.
}
}
How did you obtain that fingerprint? It doesn't look like the correct one..
Tried several servers and always gets 'CONNECTION_NOT_SECURE'. Android 4.2.1 / 4.4.2, Cordova 3.6.3 / 5.1.1.
var fingerprint = 'f0 f2 f7 01 3a 90 74 49 4b 69 66 71 21 cd 28 9e ca 40 79 e9';
var server = 'https://www.google.com';
var fingerprint = '80 d6 d6 9e b6 94 26 00 de 26 ce 5c 08 6e b6 4a 2c d0 4a 12';
var server = 'https://www.apple.com';
var fingerprint = '94 9d a2 2a 7a 5c f1 c6 5e 03 c2 f2 a5 d5 f0 d6 0a 8e 0b bf';
var server = 'https://vk.com';
Well. I found issue. When I copied the fingerprint from certificate details then invisible unicode symbols were at the beginning of fingerprint. So, be careful with copy-paste of fingerprints :)
Thanks man!