The standard Android applications for mail, calendar, contacts etc. can synchronize against SSL-protected servers but have no option to check their certificate. Basically, it is possible to either check if the certificate is issued by one of the standard (before Android 4.0, not user-editable) CAs, or not check them at all. This is not enough to reliably assert the identity of the server, which presents the risk of giving sensitive information (account passwords) to the wrong server. This problem is especially important when the server is on a semi-permament connection and found via dynamic DNS, uses self-signed or private-CA certificates, or when using public WiFi hotspots (which are rather trivial to fake and therefore are a regular MitM-attack vector).
This app checks in configurable intervals if a given HTTPS URL is reachable and the server identifies itself with the right certificate. It consists of a home screen widget displaying the status with colored "signal lights":
* green, if the connection is okay
* yellow, when a check is underway
* red, when the server is unreachable
* double red, when the server gives errors or fails certificate checking
* small white, when checking is not needed
When checking and when an error happens, the global synchronization setting is turned off. This way you should be reasonably safe that the synchronization does not try to connect to a server whose identity is not verified, given it is the same server as the one you check.
This is an open source (GPL) app. Source and further documentation is available via my Web site.
INTERNET - connect to your server (nowhere else)
ACCESS_NETWORK_STATE - determine your connection (WLAN, mobile...) to find out if checking is needed
READ_SYNC_SETTINGS, WRITE_SYNC_SETTINGS - turn sync off on checking or error
RECEIVE_BOOT_COMPLETED - automatic start (if possible, depending on Android version)
READ_EXTERNAL_STORAGE - read certificates from memory or SD card