Skip to content

Commit 34a1790

Browse files
committed
Merge pull request #1121 from quickfix-j/copilot/fix-ssl-certificate-test
Replace deprecated TLS cipher suite in `SSLCertificateTest` (cherry picked from commit 2b1a850)
1 parent 56bb894 commit 34a1790

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

quickfixj-core/src/test/java/quickfix/mina/ssl/SSLCertificateTest.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,24 @@ public class SSLCertificateTest {
8080

8181
private static final String LOCALHOST_ALIAS = "localhost-quickfixj";
8282

83+
// Cipher suites that require certificates (excludes anonymous suites)
84+
// This list provides compatibility across different JDK versions and platforms
85+
private static final String CERTIFICATE_REQUIRED_CIPHER_SUITES = String.join(",",
86+
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
87+
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
88+
"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
89+
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
90+
"TLS_RSA_WITH_AES_128_GCM_SHA256",
91+
"TLS_RSA_WITH_AES_256_GCM_SHA384",
92+
"TLS_RSA_WITH_AES_128_CBC_SHA256",
93+
"TLS_RSA_WITH_AES_256_CBC_SHA256",
94+
"TLS_AES_128_GCM_SHA256",
95+
"TLS_AES_256_GCM_SHA384"
96+
);
97+
8398
@Parameters
8499
public static List<Object[]> parameters() {
85-
return Arrays.asList(new String[][]{{"TLS_RSA_WITH_AES_128_CBC_SHA", "TLSv1.2"}, {"TLS_AES_256_GCM_SHA384", "TLSv1.3"}});
100+
return Arrays.asList(new String[][]{{"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLSv1.2"}, {"TLS_AES_256_GCM_SHA384", "TLSv1.3"}});
86101
}
87102

88103
// Note: To diagnose cipher suite errors, run with -Djavax.net.debug=ssl:handshake

0 commit comments

Comments
 (0)