-
Bug
-
Resolution: Fixed
-
P4
-
6
-
None
-
b68
-
sparc
-
solaris_9
-
Verified
JSSE sample, SSLSocketClientWithClientAuth.java, can not work with IIS on unix platform. The following is the exception thrown on unix platform:
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:284)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:319)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:720)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:677)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at SSLSocketClientWithClientAuth.main(SSLSocketClientWithClientAuth.java:142)
On windows platform, sample works as expected. The problem is at lines:
124 out.println("GET " + path + " HTTP/1.0");
125 out.println();
To work on all platforms, those two lines should be replaced with:
out.print("GET " + path + " HTTP/1.0\r\n\r\n");
Attached are the modified sample code to work with a IIS server and necessary client keystore and trusted keystore.
###@###.### 10/6/04 20:49 GMT
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:284)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:319)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:720)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:677)
at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.readLine(BufferedReader.java:299)
at java.io.BufferedReader.readLine(BufferedReader.java:362)
at SSLSocketClientWithClientAuth.main(SSLSocketClientWithClientAuth.java:142)
On windows platform, sample works as expected. The problem is at lines:
124 out.println("GET " + path + " HTTP/1.0");
125 out.println();
To work on all platforms, those two lines should be replaced with:
out.print("GET " + path + " HTTP/1.0\r\n\r\n");
Attached are the modified sample code to work with a IIS server and necessary client keystore and trusted keystore.
###@###.### 10/6/04 20:49 GMT