code: 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;
  	}
      }
docs: checks if a certificate is installed for given host:port
  
  @param context
  @param host
  @param port
  @return