--- a/jdk/src/share/classes/sun/security/ssl/Handshaker.java Thu Jul 31 17:20:40 2014 -0700
+++ b/jdk/src/share/classes/sun/security/ssl/Handshaker.java Fri Aug 01 12:05:05 2014 +0000
@@ -656,8 +656,15 @@
*/
ProtocolList getActiveProtocols() {
if (activeProtocols == null) {
+ boolean enabledSSL20Hello = false;
ArrayList<ProtocolVersion> protocols = new ArrayList<>(4);
for (ProtocolVersion protocol : enabledProtocols.collection()) {
+ // Need not to check the SSL20Hello protocol.
+ if (protocol.v == ProtocolVersion.SSL20Hello.v) {
+ enabledSSL20Hello = true;
+ continue;
+ }
+
boolean found = false;
for (CipherSuite suite : enabledCipherSuites.collection()) {
if (suite.isAvailable() && suite.obsoleted > protocol.v &&
@@ -684,6 +691,11 @@
"No available cipher suite for " + protocol);
}
}
+
+ if (!protocols.isEmpty() && enabledSSL20Hello) {
+ protocols.add(ProtocolVersion.SSL20Hello);
+ }
+
activeProtocols = new ProtocolList(protocols);
}