1-marzo-2015
admin

Ver certificados de una dirección https con HttpsURLConnection

Ver HttpsURLConnection

Ejemplo:

...
     URL url = new URL(HTTPS_DIRECCION_WEB);
     HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
     conn.connect();
     Certificate[] certs = conn.getServerCertificates();

     if (conn != null) {
          for (Certificate cert : certs) {
               log.info("Cert Type: " + cert.getType());
               ....
          }
     }
...

Comentarios cerrados.

Categorias

Linkedin