 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Janwillem Borleffs Guest
|
Posted: Sun Nov 14, 2004 1:57 pm Post subject: Software caused connection abort: recv failed |
|
|
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(context.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
|
|
| Back to top |
|
 |
Janwillem Borleffs Guest
|
Posted: Mon Nov 29, 2004 9:03 pm Post subject: Re: Software caused connection abort: recv failed |
|
|
Janwillem Borleffs wrote:
| Quote: | 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?
|
I do now.... Problem fixed.
JW
|
|
| Back to top |
|
 |
Colin Mackie Guest
|
Posted: Sun Dec 05, 2004 2:41 pm Post subject: Re: Software caused connection abort: recv failed |
|
|
What was the solution?
"Janwillem Borleffs" <jw (AT) jwscripts (DOT) com> wrote
| Quote: | Janwillem Borleffs wrote:
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?
I do now.... Problem fixed.
JW
|
|
|
| Back to top |
|
 |
Janwillem Borleffs Guest
|
Posted: Sat Dec 11, 2004 11:02 am Post subject: Re: Software caused connection abort: recv failed |
|
|
Colin Mackie wrote:
| Quote: | What was the solution?
|
The private key was missing, so the certificate chain was sent without any
authentication. After defining the pkcs12 file as the
javax.net.ssl.keyStore, the certificates where applied along with the
private key...
JW
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|