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

SSLSocket.setUseClientMode() fails to throw expected IllegalArgumentException

XMLWordPrintable

    • beta
    • other
    • linux

      According to the spec, SSL.setUseClientMode() should throw an
      IllegalArgumentException if invoked after handshaking has started
      on a secure connection. The attached example uses the SunJSSE
      provider and cycles through a list of protocols, attempting to
      change the client mode once handshaking has started. Note that
      generally the first iteration is successful and we see the
      expected exception, but subsequently we do not. The
      example code uses to "TLS" protocol twice, once successfully
      and once not.

      To reproduce, use the example and keystore, or alter the example
      to use another keystore:

      % java -version
      java version "1.4.2_03"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
      Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
      % java myExample
      testing provider SunJSSE, algorithm TLS
      succeeded, we can't set the client mode
      testing provider SunJSSE, algorithm SSL
      failed, no IllegalArgumentException!
      testing provider SunJSSE, algorithm SSLv3
      failed, no IllegalArgumentException!
      testing provider SunJSSE, algorithm TLS
      failed, no IllegalArgumentException!
      % uname -a
      Linux dickdale 2.6.5-7.108-default #1 Wed Aug 25 13:34:40 UTC 2004 i686 i686 i386 GNU/Linux
      %

      ###@###.### 2005-1-31 18:43:51 GMT

            xuelei Xuelei Fan
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: