Hello everybody,
Using the following snippet:
<snippet>
System.setProperty("javax.net.ssl.trustStore",
"/var/keystores/somehost.keystore");
// Create a trust manager that does not validate certificate chains
X509TrustManager trustMgr = new X509TrustManager() {
public void checkClientTrusted(
X509Certificate[] arg0, String arg1)
throws CertificateException {
}
public void checkServerTrusted(
X509Certificate[] arg0,String arg1)
throws CertificateException {
}
public X509Certificate[] getAcceptedIssuers() {
return new X509Certificate[0];
}
};
SSLContext context = SSLContext.getInstance("SSL");
context.init(null, new TrustManager[] { trustMgr }, null);
HttpsURLConnection.setDefaultSSLSocketFactory(cont ext.getSocketFactory());
URL url = new URL("https://somehost/");
URLConnection con = url.openConnection();
con.getInputStream();
</snippet>
I keep getting the following error:
java.net.SocketException: Software caused connection abort: recv failed
I googled for the cause, only to find that many people have the same problem
with nothing conclusive.
Anyone knows what's causing the problem?
TIA,
JW