Blame SOURCES/8076221-pr2809.patch

404409
# HG changeset patch
404409
# User xuelei
404409
# Date 1453868482 0
404409
#      Wed Jan 27 04:21:22 2016 +0000
404409
# Node ID 8d589911411743fa38badf69c10aa067eaa996b7
404409
# Parent  ceb95f0d38d7ab09762dd7ff33bb855f3088a6b5
404409
8076221, PR2809: Disable RC4 cipher suites
404409
Reviewed-by: wetmore
404409
c6ebe1
diff --git openjdk.orig/jdk/src/share/lib/security/java.security-linux openjdk/jdk/src/share/lib/security/java.security-linux
c6ebe1
--- openjdk.orig/jdk/src/share/lib/security/java.security-linux
404409
+++ openjdk/jdk/src/share/lib/security/java.security-linux
ac5d43
@@ -556,7 +556,7 @@
404409
 #
404409
 # Example:
404409
 #   jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
ac5d43
-jdk.tls.disabledAlgorithms=SSLv3, MD5withRSA, DH keySize < 1024, \
ac5d43
+jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024, \
9f670b
     EC keySize < 224, DES40_CBC, RC4_40, 3DES_EDE_CBC
404409
 
404409
 # Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
c6ebe1
diff --git openjdk.orig/jdk/src/share/lib/security/java.security-macosx openjdk/jdk/src/share/lib/security/java.security-macosx
c6ebe1
--- openjdk.orig/jdk/src/share/lib/security/java.security-macosx
404409
+++ openjdk/jdk/src/share/lib/security/java.security-macosx
ac5d43
@@ -561,7 +561,7 @@
404409
 #
404409
 # Example:
404409
 #   jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
ac5d43
-jdk.tls.disabledAlgorithms=SSLv3, MD5withRSA, DH keySize < 1024, \
ac5d43
+jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024, \
9f670b
     EC keySize < 224, DES40_CBC, RC4_40, 3DES_EDE_CBC
404409
 
404409
 # Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
c6ebe1
diff --git openjdk.orig/jdk/src/share/lib/security/java.security-solaris openjdk/jdk/src/share/lib/security/java.security-solaris
c6ebe1
--- openjdk.orig/jdk/src/share/lib/security/java.security-solaris
404409
+++ openjdk/jdk/src/share/lib/security/java.security-solaris
ac5d43
@@ -560,7 +560,7 @@
404409
 #
404409
 # Example:
404409
 #   jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
ac5d43
-jdk.tls.disabledAlgorithms=SSLv3, MD5withRSA, DH keySize < 1024, \
ac5d43
+jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024, \
9f670b
     EC keySize < 224, DES40_CBC, RC4_40, 3DES_EDE_CBC
404409
 
404409
 # Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
c6ebe1
diff --git openjdk.orig/jdk/src/share/lib/security/java.security-windows openjdk/jdk/src/share/lib/security/java.security-windows
c6ebe1
--- openjdk.orig/jdk/src/share/lib/security/java.security-windows
404409
+++ openjdk/jdk/src/share/lib/security/java.security-windows
ac5d43
@@ -561,7 +561,7 @@
404409
 #
404409
 # Example:
404409
 #   jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
ac5d43
-jdk.tls.disabledAlgorithms=SSLv3, MD5withRSA, DH keySize < 1024, \
ac5d43
+jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 1024, \
9f670b
     EC keySize < 224, DES40_CBC, RC4_40, 3DES_EDE_CBC
404409
 
404409
 # Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
c6ebe1
diff --git openjdk.orig/jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java openjdk/jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java
404409
new file mode 100644
404409
--- /dev/null
404409
+++ openjdk/jdk/test/javax/net/ssl/ciphersuites/DisabledAlgorithms.java
404409
@@ -0,0 +1,362 @@
404409
+/*
404409
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
404409
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
404409
+ *
404409
+ * This code is free software; you can redistribute it and/or modify it
404409
+ * under the terms of the GNU General Public License version 2 only, as
404409
+ * published by the Free Software Foundation.
404409
+ *
404409
+ * This code is distributed in the hope that it will be useful, but WITHOUT
404409
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
404409
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
404409
+ * version 2 for more details (a copy is included in the LICENSE file that
404409
+ * accompanied this code).
404409
+ *
404409
+ * You should have received a copy of the GNU General Public License version
404409
+ * 2 along with this work; if not, write to the Free Software Foundation,
404409
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
404409
+ *
404409
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
404409
+ * or visit www.oracle.com if you need additional information or have any
404409
+ * questions.
404409
+ */
404409
+
404409
+import java.io.BufferedInputStream;
404409
+import java.io.BufferedOutputStream;
404409
+import java.io.IOException;
404409
+import java.io.InputStream;
404409
+import java.io.OutputStream;
404409
+import java.security.NoSuchAlgorithmException;
404409
+import java.security.Security;
404409
+import java.util.concurrent.TimeUnit;
404409
+import javax.net.ssl.SSLContext;
404409
+import javax.net.ssl.SSLHandshakeException;
404409
+import javax.net.ssl.SSLServerSocket;
404409
+import javax.net.ssl.SSLServerSocketFactory;
404409
+import javax.net.ssl.SSLSocket;
404409
+import javax.net.ssl.SSLSocketFactory;
404409
+
404409
+/**
404409
+ * @test
404409
+ * @bug 8076221
404409
+ * @summary Check if weak cipher suites are disabled
404409
+ * @run main/othervm DisabledAlgorithms default
404409
+ * @run main/othervm DisabledAlgorithms empty
404409
+ */
404409
+public class DisabledAlgorithms {
404409
+
404409
+    private static final String pathToStores =
404409
+            "../../../../sun/security/ssl/etc";
404409
+    private static final String keyStoreFile = "keystore";
404409
+    private static final String trustStoreFile = "truststore";
404409
+    private static final String passwd = "passphrase";
404409
+
404409
+    private static final String keyFilename =
404409
+            System.getProperty("test.src", "./") + "/" + pathToStores +
404409
+                "/" + keyStoreFile;
404409
+
404409
+    private static final String trustFilename =
404409
+            System.getProperty("test.src", "./") + "/" + pathToStores +
404409
+                "/" + trustStoreFile;
404409
+
404409
+    // supported RC4 cipher suites
404409
+    // it does not contain KRB5 cipher suites because they need a KDC
404409
+    private static final String[] rc4_ciphersuites = new String[] {
404409
+        "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
404409
+        "TLS_ECDHE_RSA_WITH_RC4_128_SHA",
404409
+        "SSL_RSA_WITH_RC4_128_SHA",
404409
+        "TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
404409
+        "TLS_ECDH_RSA_WITH_RC4_128_SHA",
404409
+        "SSL_RSA_WITH_RC4_128_MD5",
404409
+        "TLS_ECDH_anon_WITH_RC4_128_SHA",
404409
+        "SSL_DH_anon_WITH_RC4_128_MD5"
404409
+    };
404409
+
404409
+    public static void main(String[] args) throws Exception {
404409
+        if (args.length < 1) {
404409
+            throw new RuntimeException("No parameters specified");
404409
+        }
404409
+
404409
+        System.setProperty("javax.net.ssl.keyStore", keyFilename);
404409
+        System.setProperty("javax.net.ssl.keyStorePassword", passwd);
404409
+        System.setProperty("javax.net.ssl.trustStore", trustFilename);
404409
+        System.setProperty("javax.net.ssl.trustStorePassword", passwd);
404409
+
404409
+        switch (args[0]) {
404409
+            case "default":
404409
+                // use default jdk.tls.disabledAlgorithms
404409
+                System.out.println("jdk.tls.disabledAlgorithms = "
404409
+                        + Security.getProperty("jdk.tls.disabledAlgorithms"));
404409
+
404409
+                // check if RC4 cipher suites can't be used by default
404409
+                checkFailure(rc4_ciphersuites);
404409
+                break;
404409
+            case "empty":
404409
+                // reset jdk.tls.disabledAlgorithms
404409
+                Security.setProperty("jdk.tls.disabledAlgorithms", "");
404409
+                System.out.println("jdk.tls.disabledAlgorithms = "
404409
+                        + Security.getProperty("jdk.tls.disabledAlgorithms"));
404409
+
404409
+                // check if RC4 cipher suites can be used
404409
+                // if jdk.tls.disabledAlgorithms is empty
404409
+                checkSuccess(rc4_ciphersuites);
404409
+                break;
404409
+            default:
404409
+                throw new RuntimeException("Wrong parameter: " + args[0]);
404409
+        }
404409
+    }
404409
+
404409
+    /*
404409
+     * Checks if that specified cipher suites cannot be used.
404409
+     */
404409
+    private static void checkFailure(String[] ciphersuites) throws Exception {
404409
+        try (SSLServer server = SSLServer.init(ciphersuites)) {
404409
+            startNewThread(server);
404409
+            while (!server.isRunning()) {
404409
+                sleep();
404409
+            }
404409
+
404409
+            int port = server.getPort();
404409
+            for (String ciphersuite : ciphersuites) {
404409
+                try (SSLClient client = SSLClient.init(port, ciphersuite)) {
404409
+                    client.connect();
404409
+                    throw new RuntimeException("Expected SSLHandshakeException "
404409
+                            + "not thrown");
404409
+                } catch (SSLHandshakeException e) {
404409
+                    System.out.println("Expected exception on client side: "
404409
+                            + e);
404409
+                }
404409
+            }
404409
+
404409
+            server.stop();
404409
+            while (server.isRunning()) {
404409
+                sleep();
404409
+            }
404409
+
404409
+            if (!server.sslError()) {
404409
+                throw new RuntimeException("Expected SSL exception "
404409
+                        + "not thrown on server side");
404409
+            }
404409
+        }
404409
+
404409
+    }
404409
+
404409
+    /*
404409
+     * Checks if specified cipher suites can be used.
404409
+     */
404409
+    private static void checkSuccess(String[] ciphersuites) throws Exception {
404409
+        try (SSLServer server = SSLServer.init(ciphersuites)) {
404409
+            startNewThread(server);
404409
+            while (!server.isRunning()) {
404409
+                sleep();
404409
+            }
404409
+
404409
+            int port = server.getPort();
404409
+            for (String ciphersuite : ciphersuites) {
404409
+                try (SSLClient client = SSLClient.init(port, ciphersuite)) {
404409
+                    client.connect();
404409
+                    String negotiated = client.getNegotiatedCipherSuite();
404409
+                    System.out.println("Negotiated cipher suite: "
404409
+                            + negotiated);
404409
+                    if (!negotiated.equals(ciphersuite)) {
404409
+                        throw new RuntimeException("Unexpected cipher suite: "
404409
+                                + negotiated);
404409
+                    }
404409
+                }
404409
+            }
404409
+
404409
+            server.stop();
404409
+            while (server.isRunning()) {
404409
+                sleep();
404409
+            }
404409
+
404409
+            if (server.error()) {
404409
+                throw new RuntimeException("Unexpected error on server side");
404409
+            }
404409
+        }
404409
+
404409
+    }
404409
+
404409
+    private static Thread startNewThread(SSLServer server) {
404409
+        Thread serverThread = new Thread(server, "SSL server thread");
404409
+        serverThread.setDaemon(true);
404409
+        serverThread.start();
404409
+        return serverThread;
404409
+    }
404409
+
404409
+    private static void sleep() {
404409
+        try {
404409
+            TimeUnit.MILLISECONDS.sleep(50);
404409
+        } catch (InterruptedException e) {
404409
+            // do nothing
404409
+        }
404409
+    }
404409
+
404409
+    static class SSLServer implements Runnable, AutoCloseable {
404409
+
404409
+        private final SSLServerSocket ssocket;
404409
+        private volatile boolean stopped = false;
404409
+        private volatile boolean running = false;
404409
+        private volatile boolean sslError = false;
404409
+        private volatile boolean otherError = false;
404409
+
404409
+        private SSLServer(SSLServerSocket ssocket) {
404409
+            this.ssocket = ssocket;
404409
+        }
404409
+
404409
+        @Override
404409
+        public void run() {
404409
+            System.out.println("Server: started");
404409
+            running = true;
404409
+            while (!stopped) {
404409
+                try (SSLSocket socket = (SSLSocket) ssocket.accept()) {
404409
+                    System.out.println("Server: accepted client connection");
404409
+                    InputStream in = socket.getInputStream();
404409
+                    OutputStream out = socket.getOutputStream();
404409
+                    int b = in.read();
404409
+                    if (b < 0) {
404409
+                        throw new IOException("Unexpected EOF");
404409
+                    }
404409
+                    System.out.println("Server: send data: " + b);
404409
+                    out.write(b);
404409
+                    out.flush();
404409
+                    socket.getSession().invalidate();
404409
+                } catch (SSLHandshakeException e) {
404409
+                    System.out.println("Server: run: " + e);
404409
+                    sslError = true;
404409
+                } catch (IOException e) {
404409
+                    if (!stopped) {
404409
+                        System.out.println("Server: run: " + e);
404409
+                        e.printStackTrace();
404409
+                        otherError = true;
404409
+                    }
404409
+                }
404409
+            }
404409
+
404409
+            System.out.println("Server: finished");
404409
+            running = false;
404409
+        }
404409
+
404409
+        int getPort() {
404409
+            return ssocket.getLocalPort();
404409
+        }
404409
+
404409
+        String[] getEnabledCiperSuites() {
404409
+            return ssocket.getEnabledCipherSuites();
404409
+        }
404409
+
404409
+        boolean isRunning() {
404409
+            return running;
404409
+        }
404409
+
404409
+        boolean sslError() {
404409
+            return sslError;
404409
+        }
404409
+
404409
+        boolean error() {
404409
+            return sslError || otherError;
404409
+        }
404409
+
404409
+        void stop() {
404409
+            stopped = true;
404409
+            if (!ssocket.isClosed()) {
404409
+                try {
404409
+                    ssocket.close();
404409
+                } catch (IOException e) {
404409
+                    System.out.println("Server: close: " + e);
404409
+                }
404409
+            }
404409
+        }
404409
+
404409
+        @Override
404409
+        public void close() {
404409
+            stop();
404409
+        }
404409
+
404409
+        static SSLServer init(String[] ciphersuites)
404409
+                throws IOException {
404409
+            SSLServerSocketFactory ssf = (SSLServerSocketFactory)
404409
+                    SSLServerSocketFactory.getDefault();
404409
+            SSLServerSocket ssocket = (SSLServerSocket)
404409
+                    ssf.createServerSocket(0);
404409
+
404409
+            if (ciphersuites != null) {
404409
+                System.out.println("Server: enable cipher suites: "
404409
+                        + java.util.Arrays.toString(ciphersuites));
404409
+                ssocket.setEnabledCipherSuites(ciphersuites);
404409
+            }
404409
+
404409
+            return new SSLServer(ssocket);
404409
+        }
404409
+    }
404409
+
404409
+    static class SSLClient implements AutoCloseable {
404409
+
404409
+        private final SSLSocket socket;
404409
+
404409
+        private SSLClient(SSLSocket socket) {
404409
+            this.socket = socket;
404409
+        }
404409
+
404409
+        void connect() throws IOException {
404409
+            System.out.println("Client: connect to server");
404409
+            try (
404409
+                    BufferedInputStream bis = new BufferedInputStream(
404409
+                            socket.getInputStream());
404409
+                    BufferedOutputStream bos = new BufferedOutputStream(
404409
+                            socket.getOutputStream())) {
404409
+                bos.write('x');
404409
+                bos.flush();
404409
+
404409
+                int read = bis.read();
404409
+                if (read < 0) {
404409
+                    throw new IOException("Client: couldn't read a response");
404409
+                }
404409
+                socket.getSession().invalidate();
404409
+            }
404409
+        }
404409
+
404409
+        String[] getEnabledCiperSuites() {
404409
+            return socket.getEnabledCipherSuites();
404409
+        }
404409
+
404409
+        String getNegotiatedCipherSuite() {
404409
+            return socket.getSession().getCipherSuite();
404409
+        }
404409
+
404409
+        @Override
404409
+        public void close() throws Exception {
404409
+            if (!socket.isClosed()) {
404409
+                try {
404409
+                    socket.close();
404409
+                } catch (IOException e) {
404409
+                    System.out.println("Client: close: " + e);
404409
+                }
404409
+            }
404409
+        }
404409
+
404409
+        static SSLClient init(int port)
404409
+                throws NoSuchAlgorithmException, IOException {
404409
+            return init(port, null);
404409
+        }
404409
+
404409
+        static SSLClient init(int port, String ciphersuite)
404409
+                throws NoSuchAlgorithmException, IOException {
404409
+            SSLContext context = SSLContext.getDefault();
404409
+            SSLSocketFactory ssf = (SSLSocketFactory)
404409
+                    context.getSocketFactory();
404409
+            SSLSocket socket = (SSLSocket) ssf.createSocket("localhost", port);
404409
+
404409
+            if (ciphersuite != null) {
404409
+                System.out.println("Client: enable cipher suite: "
404409
+                        + ciphersuite);
404409
+                socket.setEnabledCipherSuites(new String[] { ciphersuite });
404409
+            }
404409
+
404409
+            return new SSLClient(socket);
404409
+        }
404409
+
404409
+    }
404409
+
404409
+
404409
+}
c6ebe1
diff --git openjdk.orig/test/sun/security/krb5/auto/SSL.java openjdk/test/sun/security/krb5/auto/SSL.java
c6ebe1
--- openjdk.orig/jdk/test/sun/security/krb5/auto/SSL.java
404409
+++ openjdk/jdk/test/sun/security/krb5/auto/SSL.java
404409
@@ -1,5 +1,5 @@
404409
 /*
404409
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
404409
+ * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
404409
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
404409
  *
404409
  * This code is free software; you can redistribute it and/or modify it
404409
@@ -40,6 +40,7 @@
404409
 import java.net.InetAddress;
404409
 import javax.net.ssl.*;
404409
 import java.security.Principal;
404409
+import java.security.Security;
404409
 import java.util.Date;
404409
 import sun.security.jgss.GSSUtil;
404409
 import sun.security.krb5.PrincipalName;
404409
@@ -54,6 +55,9 @@
404409
     private static volatile int port;
404409
 
404409
     public static void main(String[] args) throws Exception {
404409
+        // reset the security property to make sure that the algorithms
404409
+        // and keys used in this test are not disabled.
404409
+        Security.setProperty("jdk.tls.disabledAlgorithms", "");
404409
 
404409
         krb5Cipher = args[0];
404409
 
c6ebe1
diff --git openjdk.orig/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/ClientHandshaker/CipherSuiteOrder.java openjdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/ClientHandshaker/CipherSuiteOrder.java
c6ebe1
--- openjdk.orig/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/ClientHandshaker/CipherSuiteOrder.java
404409
+++ openjdk/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/ClientHandshaker/CipherSuiteOrder.java
404409
@@ -1,5 +1,5 @@
404409
 /*
404409
- * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
404409
+ * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
404409
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
404409
  *
404409
  * This code is free software; you can redistribute it and/or modify it
404409
@@ -36,7 +36,7 @@
404409
  */
404409
 
404409
 import java.io.*;
404409
-import java.net.*;
404409
+import java.security.Security;
404409
 import javax.net.ssl.*;
404409
 
404409
 public class CipherSuiteOrder {
404409
@@ -198,6 +198,10 @@
404409
     volatile Exception clientException = null;
404409
 
404409
     public static void main(String[] args) throws Exception {
404409
+        // reset the security property to make sure that the algorithms
404409
+        // and keys used in this test are not disabled.
404409
+        Security.setProperty("jdk.tls.disabledAlgorithms", "");
404409
+
404409
         String keyFilename =
404409
             System.getProperty("test.src", "./") + "/" + pathToStores +
404409
                 "/" + keyStoreFile;
c6ebe1
diff --git openjdk.orig/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java openjdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java
c6ebe1
--- openjdk.orig/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java
404409
+++ openjdk/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/DHKeyExchange/DHEKeySizing.java
404409
@@ -103,10 +103,10 @@
404409
 import java.security.Security;
404409
 import java.security.KeyStore;
404409
 import java.security.KeyFactory;
404409
+import java.security.Security;
404409
 import java.security.cert.Certificate;
404409
 import java.security.cert.CertificateFactory;
404409
 import java.security.spec.PKCS8EncodedKeySpec;
404409
-import java.security.spec.*;
404409
 import java.security.interfaces.*;
404409
 import sun.misc.BASE64Decoder;
404409
 
c6ebe1
diff --git openjdk.orig/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/CheckStatus.java openjdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/CheckStatus.java
c6ebe1
--- openjdk.orig/jdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/CheckStatus.java
404409
+++ openjdk/jdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/CheckStatus.java
404409
@@ -1,5 +1,5 @@
404409
 /*
404409
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
404409
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
404409
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
404409
  *
404409
  * This code is free software; you can redistribute it and/or modify it
404409
@@ -622,6 +622,9 @@
404409
     }
404409
 
404409
     public static void main(String args[]) throws Exception {
404409
+        // reset the security property to make sure that the algorithms
404409
+        // and keys used in this test are not disabled.
404409
+        Security.setProperty("jdk.tls.disabledAlgorithms", "");
404409
 
404409
         CheckStatus cs;
404409
 
c6ebe1
diff --git openjdk.orig/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/ConnectionTest.java openjdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/ConnectionTest.java
c6ebe1
--- openjdk.orig/jdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/ConnectionTest.java
404409
+++ openjdk/jdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/ConnectionTest.java
404409
@@ -33,6 +33,8 @@
404409
  * The code could certainly be tightened up a lot.
404409
  *
404409
  * @author Brad Wetmore
404409
+ *
404409
+ * @run main/othervm ConnectionTest
404409
  */
404409
 
404409
 import javax.net.ssl.*;
404409
@@ -672,6 +674,10 @@
404409
     }
404409
 
404409
     public static void main(String args[]) throws Exception {
404409
+        // reset the security property to make sure that the algorithms
404409
+        // and keys used in this test are not disabled.
404409
+        Security.setProperty("jdk.tls.disabledAlgorithms", "");
404409
+
404409
         ConnectionTest ct = new ConnectionTest();
404409
         ct.test();
404409
     }
c6ebe1
diff --git openjdk.orig/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/LargeBufs.java openjdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/LargeBufs.java
c6ebe1
--- openjdk.orig/jdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/LargeBufs.java
404409
+++ openjdk/jdk/test/sun/security/ssl/javax/net/ssl/NewAPIs/SSLEngine/LargeBufs.java
404409
@@ -180,6 +180,9 @@
404409
     }
404409
 
404409
     public static void main(String args[]) throws Exception {
404409
+        // reset the security property to make sure that the algorithms
404409
+        // and keys used in this test are not disabled.
404409
+        Security.setProperty("jdk.tls.disabledAlgorithms", "");
404409
 
404409
         LargeBufs test;
404409
 
c6ebe1
diff --git openjdk.orig/test/sun/security/ssl/javax/net/ssl/TLSv11/GenericStreamCipher.java openjdk/test/sun/security/ssl/javax/net/ssl/TLSv11/GenericStreamCipher.java
c6ebe1
--- openjdk.orig/jdk/test/sun/security/ssl/javax/net/ssl/TLSv11/GenericStreamCipher.java
404409
+++ openjdk/jdk/test/sun/security/ssl/javax/net/ssl/TLSv11/GenericStreamCipher.java
404409
@@ -37,7 +37,7 @@
404409
  */
404409
 
404409
 import java.io.*;
404409
-import java.net.*;
404409
+import java.security.Security;
404409
 import javax.net.ssl.*;
404409
 
404409
 public class GenericStreamCipher {
404409
@@ -165,6 +165,10 @@
404409
     volatile Exception clientException = null;
404409
 
404409
     public static void main(String[] args) throws Exception {
404409
+        // reset the security property to make sure that the algorithms
404409
+        // and keys used in this test are not disabled.
404409
+        Security.setProperty("jdk.tls.disabledAlgorithms", "");
404409
+
404409
         String keyFilename =
404409
             System.getProperty("test.src", ".") + "/" + pathToStores +
404409
                 "/" + keyStoreFile;