check(host, x509);
/** * The javax.net.ssl.HostnameVerifier contract. * * @param host 'hostname' we used to create our socket * @param session SSLSession with the remote server * @return true if the host matched the one in the certificate. */ @Override public boolean verify(String host, SSLSession session) { try { Certificate[] certs = session.getPeerCertificates(); X509Certificate x509 = (X509Certificate) certs[0]; check(new String[]{host}, x509); return true; } catch (SSLException e) { return false; } }
@Override public void check(String[] host, X509Certificate cert) throws SSLException { String[] cns = Certificates.getCNs(cert); String[] subjectAlts = Certificates.getDNSSubjectAlts(cert); try { check(host, cns, subjectAlts); } catch (SSLException e) { LOG.error("Host check error {}", e); throw e; } }
@Override public void check(String host, SSLSocket ssl) throws IOException { check(new String[]{host}, ssl); }
@Override public void check(String host, SSLSocket ssl) throws IOException { check(new String[]{host}, ssl); }
@Override public void check(String host, X509Certificate cert) throws SSLException { check(new String[]{host}, cert); }
@Override public void check(String host, X509Certificate cert) throws SSLException { check(new String[]{host}, cert); }
@Override public void check(String[] host, X509Certificate cert) throws SSLException { String[] cns = Certificates.getCNs(cert); String[] subjectAlts = Certificates.getDNSSubjectAlts(cert); check(host, cns, subjectAlts); }
@Override public void check(String host, String[] cns, String[] subjectAlts) throws SSLException { check(new String[]{host}, cns, subjectAlts); }
@Override public void check(String host, String[] cns, String[] subjectAlts) throws SSLException { check(new String[]{host}, cns, subjectAlts); }
@Override public void check(String host, X509Certificate cert) throws SSLException { check(new String[]{host}, cert); }
@Override public void check(String[] host, X509Certificate cert) throws SSLException { String[] cns = Certificates.getCNs(cert); String[] subjectAlts = Certificates.getDNSSubjectAlts(cert); check(host, cns, subjectAlts); }
@Override public void check(String host, String[] cns, String[] subjectAlts) throws SSLException { check(new String[]{host}, cns, subjectAlts); }
@Override public void check(String host, String[] cns, String[] subjectAlts) throws SSLException { check(new String[]{host}, cns, subjectAlts); }
@Override public void check(String host, X509Certificate cert) throws SSLException { check(new String[]{host}, cert); }
@Override public void check(String[] host, X509Certificate cert) throws SSLException { String[] cns = Certificates.getCNs(cert); String[] subjectAlts = Certificates.getDNSSubjectAlts(cert); check(host, cns, subjectAlts); }
@Override public void check(String[] host, X509Certificate cert) throws SSLException { String[] cns = Certificates.getCNs(cert); String[] subjectAlts = Certificates.getDNSSubjectAlts(cert); check(host, cns, subjectAlts); }
@Override public void check(String host, String[] cns, String[] subjectAlts) throws SSLException { check(new String[]{host}, cns, subjectAlts); }
@Override public void check(String host, SSLSocket ssl) throws IOException { check(new String[]{host}, ssl); }
@Override public void check(String host, X509Certificate cert) throws SSLException { check(new String[]{host}, cert); }