Google has advised that I have an unsafe implementation of the interface X509TrustManager in my Android application and need to change my code as follows:
I have solved this using the following code:
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { try { chain[0].checkValidity(); } catch (Exception e) { throw new CertificateException("Certificate not valid or trusted."); } }