Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions server/test/com/mirth/connect/util/MirthSSLUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,9 @@ public void testEnabledProtocols() throws Exception {
String[] enabledClientProtocols = MirthSSLUtil.getEnabledHttpsProtocols(defaultClientProtocols);
String[] enabledServerProtocols = MirthSSLUtil.getEnabledHttpsProtocols(defaultServerProtocols);

// TLSv1.3 supported in Java 11+
if (getJavaVersion() >= 11) {
assertTrue(ArrayUtils.contains(enabledClientProtocols, "TLSv1.3"));
assertTrue(ArrayUtils.contains(enabledServerProtocols, "TLSv1.3"));
} else {
assertFalse(ArrayUtils.contains(enabledClientProtocols, "TLSv1.3"));
assertFalse(ArrayUtils.contains(enabledServerProtocols, "TLSv1.3"));
}
// TLSv1.3 supported in Java 8u261+
assertTrue(ArrayUtils.contains(enabledClientProtocols, "TLSv1.3"));
assertTrue(ArrayUtils.contains(enabledServerProtocols, "TLSv1.3"));
}

@Test
Expand All @@ -47,12 +42,8 @@ public void testEnabledCipherSuites() throws Exception {

String[] enabledClientCipherSuites = MirthSSLUtil.getEnabledHttpsCipherSuites(defaultClientCipherSuites);

// TLS_AES_256_GCM_SHA384 supported in Java 11+
if (getJavaVersion() >= 11) {
assertTrue(ArrayUtils.contains(enabledClientCipherSuites, "TLS_AES_256_GCM_SHA384"));
} else {
assertFalse(ArrayUtils.contains(enabledClientCipherSuites, "TLS_AES_256_GCM_SHA384"));
}
// TLS_AES_256_GCM_SHA384 supported in Java 8u261+
assertTrue(ArrayUtils.contains(enabledClientCipherSuites, "TLS_AES_256_GCM_SHA384"));
}

private int getJavaVersion() {
Expand Down