Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always getting CONNECTION_NOT_SECURE message #48

Open
vinoddavis opened this issue Mar 22, 2018 · 0 comments
Open

Always getting CONNECTION_NOT_SECURE message #48

vinoddavis opened this issue Mar 22, 2018 · 0 comments

Comments

@vinoddavis
Copy link

vinoddavis commented Mar 22, 2018

I'm trying to integrate the plug-in in to my phonegap app. I followed all the steps. Its always giving me CONNECTION_NOT_SECURE message. Thinking that its an issue with our website, I tried other public websites. But I'm always getting CONNECTION_NOT_SECURE message. Any help would be highly appreciated.

I have included in the phonegap config.xml.

The following script in included in index.html

<script type="text/javascript"> document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { var server = "https://build.phonegap.com"; var fingerprint = "‎77 8d d9 8a 7d 2b c5 25 a1 8f 16 d0 0d 43 4a cb 6a 37 02 01"; 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") { // There is likely a man in the middle attack going on, be careful! } 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. } } } </script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant