The expected exception may be not thrown in order JDK-8145252-TLS13-branch
authorxuelei
Sun, 20 May 2018 09:45:36 -0700
branchJDK-8145252-TLS13-branch
changeset 56575 c31233a71bd9
parent 56573 4a53dd94403e
child 56579 fb93f16d20fa
The expected exception may be not thrown in order
test/jdk/javax/net/ssl/ciphersuites/ECCurvesconstraints.java
--- a/test/jdk/javax/net/ssl/ciphersuites/ECCurvesconstraints.java	Fri May 18 19:07:49 2018 -0700
+++ b/test/jdk/javax/net/ssl/ciphersuites/ECCurvesconstraints.java	Sun May 20 09:45:36 2018 -0700
@@ -40,6 +40,7 @@
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.io.IOException;
 import java.security.KeyStore;
 import java.security.KeyFactory;
 import java.security.cert.Certificate;
@@ -49,7 +50,6 @@
 import java.util.Base64;
 import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLHandshakeException;
 import javax.net.ssl.SSLServerSocket;
 import javax.net.ssl.SSLServerSocketFactory;
 import javax.net.ssl.SSLSocket;
@@ -141,7 +141,7 @@
             sslOS.flush();
 
             throw new Exception("EC curve secp224k1 should be disabled");
-        } catch (SSLHandshakeException she) {
+        } catch (IOException she) {
             // expected exception: no cipher suites in common
             System.out.println("Expected exception: " + she);
         } finally {
@@ -183,7 +183,7 @@
             sslIS.read();
 
             throw new Exception("EC curve secp224k1 should be disabled");
-        } catch (SSLHandshakeException she) {
+        } catch (IOException she) {
             // expected exception: Received fatal alert
             System.out.println("Expected exception: " + she);
         } finally {