Skip to content

Enable TLSv1.3 with a different property. #1745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ subprojects {
test {
systemProperty "file.encoding", "UTF-8"
systemProperty "javax.xml.stream.XMLOutputFactory", "com.sun.xml.internal.stream.XMLOutputFactoryImpl"
// Java 8 requires the TLSv1.3 be enabled before using it.
systemProperty "jdk.tls.client.protocols", "TLSv1.3,TLSv1.2"
}

// Until we do a cleanup of javadoc errors, the build (and specifically the javadoc task) fails on Java 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import com.marklogic.mgmt.ManageClient;
import com.marklogic.mgmt.resource.appservers.ServerManager;
import org.junit.jupiter.api.*;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.JRE;
import org.junit.jupiter.api.extension.ExtendWith;

import javax.net.ssl.SSLContext;
Expand Down Expand Up @@ -130,6 +132,9 @@ void noSslContext() throws Exception {
);
}

// The TLS tests are failing on Java 8, because TLSv1.3 is disabled with our version of Java 8.
// There may be a way to configure Java 8 to use TLSv1.3, but it is not currently working.
@DisabledOnJre(JRE.JAVA_8)
@Test
void tLS13ClientWithTLS12Server() throws Exception {
DatabaseClient client = buildTrustAllClientWithSSLProtocol("TLSv1.3");
Expand All @@ -140,6 +145,7 @@ void tLS13ClientWithTLS12Server() throws Exception {
}

@ExtendWith(RequiresML12.class)
@DisabledOnJre(JRE.JAVA_8)
@Test
void tLS13ClientWithTLS13Server() throws Exception {
setAppServerMinimumTLSVersion("TLSv1.3");
Expand All @@ -152,6 +158,7 @@ void tLS13ClientWithTLS13Server() throws Exception {
}

@ExtendWith(RequiresML12.class)
@DisabledOnJre(JRE.JAVA_8)
@Test
void tLS12ClientWithTLS13ServerShouldFail() throws Exception {
setAppServerMinimumTLSVersion("TLSv1.3");
Expand Down