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

Remove IllegalStateException SSLSocket.startHandshake/SSLEngine.beginHandshake

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: security-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b36
    • CPU:
      sparc
    • OS:
      solaris_2.6
    • Verification:
      Verified

      Description



      Name: ktR10099 Date: 12/16/2003



      According to the spec for javax.net.ssl.SSLSocket.startHandshake() it
      should throw "...IllegalStateException - if attempted to handshake on a
      closed socket". Please find below example, demostarting that
      SocketException is thrown instead.
      -----------------------------test143.java------------------------
      import javax.net.ssl.*;

      public class test143 {
          public static void main(String[] args) {
              SSLSocket s = null;
              try {
                  SSLSocketFactory sf = (SSLSocketFactory)SSLSocketFactory.getDefault();
                  s = (SSLSocket)sf.createSocket();
              } catch (Exception e) {
                  System.out.println(e);
              }
              try {
                  s.startHandshake();
              } catch (Exception e) {
                  System.out.println(e);
              }
              System.out.println("Finished");
          }
      }
      -------------------------output of test143---------------------------
      java full version "1.5.0-beta-b31"
      java.net.SocketException: Socket is not connected
      Finished
      ---------------------------------------------------------------------
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              wetmore Bradford Wetmore
              Reporter:
              kvtsunw Kvt Kvt (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: