8245005: javax/net/ssl/compatibility/BasicConnectTest.java failed with No enum constant

Reviewed-by: xuelei
This commit is contained in:
John Jiang 2020-05-16 05:49:47 +08:00
parent 1e251e9471
commit 46cf294250
3 changed files with 27 additions and 9 deletions

View File

@ -172,12 +172,32 @@ public enum CipherSuite {
0x0032, KeyExAlgorithm.DHE_DSS, Protocol.SSLV3, Protocol.TLSV1_2),
TLS_RSA_WITH_AES_128_CBC_SHA(
0x002F, KeyExAlgorithm.RSA, Protocol.SSLV3, Protocol.TLSV1_2),
TLS_KRB5_EXPORT_WITH_RC4_40_MD5(
0x002B, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_2),
TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5(
0x002A, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_2),
TLS_KRB5_EXPORT_WITH_RC4_40_SHA(
0x0028, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_2),
TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5(
0x0029, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_1),
TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA(
0x0027, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_2),
TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA(
0x0026, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_1),
TLS_KRB5_WITH_IDEA_CBC_MD5(
0x0025, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_1),
TLS_KRB5_WITH_RC4_128_MD5(
0x0024, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_2),
TLS_KRB5_WITH_3DES_EDE_CBC_MD5(
0x0023, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_2),
0x0023, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_1),
TLS_KRB5_WITH_DES_CBC_MD5(
0x0022,KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_1),
0x0022, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_1),
TLS_KRB5_WITH_IDEA_CBC_SHA(
0x0021, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_1),
TLS_KRB5_WITH_RC4_128_SHA(
0x0020, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_2),
TLS_KRB5_WITH_3DES_EDE_CBC_SHA(
0x001F, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_2),
0x001F, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_1),
TLS_KRB5_WITH_DES_CBC_SHA(
0x001E, KeyExAlgorithm.KRB5, Protocol.SSLV3, Protocol.TLSV1_2),
SSL_DH_anon_WITH_3DES_EDE_CBC_SHA(

View File

@ -80,8 +80,7 @@ public class Utilities {
public static final String PARAM_DELIMITER = ";";
public static final String VALUE_DELIMITER = ",";
public static final CipherSuite[] ALL_CIPHER_SUITES
= Utilities.getAllCipherSuites();
public static final CipherSuite[] ALL_CIPHER_SUITES = getAllCipherSuites();
/*
* Gets all supported cipher suites.
@ -101,8 +100,7 @@ public class Utilities {
.map(cipherSuite -> {
return CipherSuite.cipherSuite(cipherSuite);})
.filter(cipherSuite -> {
return cipherSuite
!= CipherSuite.TLS_EMPTY_RENEGOTIATION_INFO_SCSV;})
return cipherSuite != CipherSuite.TLS_EMPTY_RENEGOTIATION_INFO_SCSV; })
.toArray(CipherSuite[]::new);
return cipherSuites;

View File

@ -30,7 +30,7 @@ different JDK releases can load and run associated classes.
jtreg [-options] \
[-Dtest.debug=<true|false>] \
[-Dtest.jdk.list.file=</path/to/jdkListFile>] \
$JDK_WORKSPACE/test/jdk/javax/net/ssl/compatibility/Compatibility.java
$JDK_WORKSPACE/test/jdk/javax/net/ssl/compatibility/<XXX.java>
Besides the common jtreg options, like -jdk, this test introduces some more
properties:
@ -54,7 +54,7 @@ $ cat /path/to/jdkList
$ jtreg -jdk:/path/to/latest/jdk \
-Ddebug=true \
-Dtest.jdk.list.file=/path/to/jdkList \
$JDK_WS/jdk/test/javax/net/ssl/compatibility/Compatibility.java
$JDK_WS/jdk/test/javax/net/ssl/compatibility/<XXX.java>
The above example uses a file "/path/to/jdkList" to contain the paths of local
different JDK builds through 8 to 10. The execution uses each of JDK builds as
server and client respectively. And it enables SSL debug flag, and tests the