<font size=2 face="sans-serif">Thinking out loud here...seems like we
need to talk about impacts on both sides of the wire.</font>
<br>
<br><font size=2 face="sans-serif">On the client side, I don't think this
can have any effect.  According to the TLS RFC (</font><a href=http://www.ietf.org/rfc/rfc5246.txt><font size=2 color=blue face="sans-serif">link</font></a><font size=2 face="sans-serif">),
the ClientHello includes the </font>
<br>
<br><tt><font size=3>cipher_suites<br>
      This is a list of the cryptographic options supported
by the<br>
      client, with the client's first preference first.
 If the<br>
      session_id field is not empty (implying a session
resumption<br>
      request), this vector MUST include at least the cipher_suite
from<br>
      that session.  Values are defined in Appendix
A.5.</font></tt>
<br>
<br><font size=2 face="sans-serif">So according to the spec, the client's
first preference is to be first in the list.  If the client is now
passing an unordered list, how does the server know the client doesn't
care?  There's no provision for passing an indicator in the protocol.
 So I don't think this proposal really applies on the client side,
and perhaps the setting name is too general (should be setUseClientsCipherSuiteOrder?)</font>
<br>
<br><font size=2 face="sans-serif">On the server side, this may explicitly
force the server to follow the client's list order, or to do whatever it
does today.  We need to be clear what "true" means and what
"false" means.  (Does "false" mean that the server
CANNOT follow the client's preferences?)</font>
<br>
<br><font size=2 face="sans-serif">And if I understood your example correctly,
the Oracle server today follows SSLParameters.setUseCipherSuitesOrder(true),
so to change behavior, it would have to be set to SSLParameters.setUseCipherSuitesOrder(false).
 Unless of course, it's supposed to mean "use local preferences
for cipher ordering", and the server interprets it according to its
priority order (not expressed in the protocol in any way), in which case
maybe the operation would be called SSLParameters.setUseLocalCipherSuitesOrder(boolean).
 However, a setting to "false" still cannot really mean
anything on the client side, for the reasons mentioned above.</font>
<br><font size=2 face="sans-serif"><br>
Bruce A Rich<br>
brich at-sign us dot ibm dot com<br>
</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:      
 </font><font size=1 face="sans-serif">Xuelei Fan <xuelei.fan@oracle.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:      
 </font><font size=1 face="sans-serif">OpenJDK <security-dev@openjdk.java.net></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:      
 </font><font size=1 face="sans-serif">08/05/2013 09:10 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:    
   </font><font size=1 face="sans-serif">There should
be a way to reorder the JSSE ciphers</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by:    
   </font><font size=1 face="sans-serif">security-dev-bounces@openjdk.java.net</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Hi,<br>
<br>
We are thinking about to support cipher suites preference in JSSE by<br>
defining new methods in javax.net.ssl.SSLParameters.<br>
<br>
----------------------------------------------------<br>
+    /**<br>
+     * Sets whether the cipher suites preference should be honored.<br>
+     *<br>
+     * @param on whether local cipher suites order in<br>
+     *         {@code #getCipherSuites}<br>
+     *        should be honored during SSL/TLS
handshaking.<br>
+     */<br>
+    public final void setUseCipherSuitesOrder(boolean on);<br>
<br>
<br>
+    /**<br>
+     * Returns whether the cipher suites preference should be
honored.<br>
+     *<br>
+     * @return whether local cipher suites order in<br>
+               {@code #getCipherSuites}<br>
+     *         should be honored during
SSL/TLS handshaking.<br>
+     */<br>
+    public final boolean getUseCipherSuitesOrder();<br>
----------------------------------------------------<br>
<br>
<br>
By default, Oracle JSSE provider still honors the client's preference.<br>
The behavior can be changed by calling<br>
SSLParameters.setUseCipherSuitesOrder(true) in server side.<br>
<br>
We have had the cipher suites preference ordering in client side for<br>
many years, but we never said how to actually do it in specification and<br>
JSSE Reference Guide.  With this update, the client side can enforce
to<br>
honor cipher suite preference with the new method,<br>
SSLParameters.setUseCipherSuitesOrder(true).  Other providers should<br>
also comply with this specification.<br>
<br>
Any feedback are welcome.<br>
<br>
Thanks,<br>
Xuelei<br>
<br>
</font></tt>
<br>