I have the following code bit:
sslconn = (HttpsURLConnection) url.openConnection();
sslconn.setHostnameVerifier(new HostnameVerifier()
{
public boolean verify(String hostname, SSLSession session)
{
System.out.println("hostname: " + hostname);
System.out.println("peer host: " + session.getPeerHost());
return true;
}
public boolean verify(String hostname, String certHostname)
{
System.out.println("hostname: " + hostname);
System.out.println("cert hostname: " + certHostname);
return true;
}
});
sslconn.connect();
When this code is run, I get the typical error below and nothing is printed to the console. As you can see, I've been scouring the net for answers to this, and I've included both the old-style and new-style verify() methods, to no avail. I am running J2SE 1.4.1. Thank you in advance.
javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate chaining error: issuer DN != subject DN