Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6175140

Sample, SSLSocketClientWithClientAuth.java, can not work with IIS on unix platform.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 6
    • security-libs
    • 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

            duke J. Duke
            bsitu Bill Situ
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: