EddyVerbruggen / SSLCertificateChecker-PhoneGap-Plugin

:passport_control: Prevent Man in the Middle attacks with this Cordova plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using plugin whenever you communicate with a server

jacobweber opened this issue · comments

"You may want to check the connection when the app is started, but you can choose to invoke this plugin everytime you communicate with the server."

How would I use this the second way? I'd rather not have to make extra HTTP calls just to check the certs. Is there a way to have it automatically check them whenever it tries to make a connection?

I think you can implement the second way by implementing your business http call in the success callback of the plugin. This will mean two HTTP calls.

I don't really understand why you want to do this in 1 HTTP call? Wouldn't this mean that you will be sending your data to a potentially unsafe server?

I was hoping it could verify the certs during the normal SSL handshake. So if the verification failed, the HTTP call would fail, like with any untrusted site. Then data wouldn't be sent to an unsafe server, and I wouldn't need to change any code on the JavaScript side.

Jacob, as you've seen in [#9], it's quite useless on iOS to check the connection every time (because of the cached results), so I'm closing this one.