Can't get server certificate from site
问题 I can't get the certificate from my website (neither other website). I tried some solutions with HttpsURLConnection and the method getServerCertificates but nothing solves the problem. URL httpsURL = new URL("https://www.google.com.br/"); HttpsURLConnection connection = (HttpsURLConnection)httpsURL.openConnection(); Certificate[] certs = connection.getServerCertificates(); I get an exception saying that "getServerCertificates cannot be resolved." I don't think its necessary to use keystore,