Skip to content

Commit 9a06b56

Browse files
authoredAug 11, 2022
Merge pull request #1353 from kstekovi/UNDERTOW-2112_2.2.x
UNDERTOW-2112 Client Cert Renegotiation is not supported by JDK14 and newer.
2 parents 5177c78 + c9b4c24 commit 9a06b56

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎core/src/test/java/io/undertow/server/security/ClientCertRenegotiationTestCase.java

+9
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import org.apache.http.client.methods.HttpPost;
3535
import org.apache.http.entity.StringEntity;
3636
import org.junit.AfterClass;
37+
import org.junit.Assume;
3738
import org.junit.BeforeClass;
3839
import org.junit.Test;
3940
import org.junit.runner.RunWith;
@@ -67,6 +68,8 @@ protected List<AuthenticationMechanism> getTestMechanisms() {
6768

6869
@BeforeClass
6970
public static void startSSL() throws Exception {
71+
Assume.assumeTrue("UNDERTOW-2112 New version TLSv1.3 and JDK14 and newer versions are breaking this feature",
72+
getJavaSpecificationVersion() < 14);
7073
DefaultServer.startSSLServer(OptionMap.create(SSL_CLIENT_AUTH_MODE, NOT_REQUESTED));
7174
clientSSLContext = DefaultServer.getClientSSLContext();
7275
}
@@ -149,4 +152,10 @@ public void testClientCertSuccessWithLargePostBody() throws Exception {
149152
HttpClientUtils.readResponse(result);
150153
assertSingleNotificationType(EventType.AUTHENTICATED);
151154
}
155+
156+
private static int getJavaSpecificationVersion() {
157+
String versionString = System.getProperty("java.specification.version");
158+
versionString = versionString.startsWith("1.") ? versionString.substring(2) : versionString;
159+
return Integer.parseInt(versionString);
160+
}
152161
}

0 commit comments

Comments
 (0)