public IOException checkCertificate(){
  SSLSocketFactory factory=context.getSocketFactory();
  try {
    SSLSocket socket=(SSLSocket)factory.createSocket(host,port);
    socket.setSoTimeout(10000);
    socket.startHandshake();
    socket.close();
    return null;
  }
 catch (  IOException e) {
    return e;
  }
}

public IOException checkCertificate ( ) { SSLSocketFactory factory = context . getSocketFactory ( ) ; try { SSLSocket socket = ( SSLSocket ) factory . createSocket ( host , port ) ; socket . setSoTimeout ( 10000 ) ; socket . startHandshake ( ) ; socket . close ( ) ; return null ; } catch ( IOException e ) { return e ; } }
checks if a certificate is installed for given host : port
