From c9b4c2417037d32d909bfb8df47ca33cf58c8c28 Mon Sep 17 00:00:00 2001 From: Krystof Stekovic Date: Wed, 22 Jun 2022 14:31:43 +0200 Subject: [PATCH] UNDERTOW-2112 Assume the testcase for jdk < 14. New version TLSv1.3 and new JDK versions are breaking this feature --- .../server/security/ClientCertRenegotiationTestCase.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/src/test/java/io/undertow/server/security/ClientCertRenegotiationTestCase.java b/core/src/test/java/io/undertow/server/security/ClientCertRenegotiationTestCase.java index ab7cfa5223..83b1dfe33a 100644 --- a/core/src/test/java/io/undertow/server/security/ClientCertRenegotiationTestCase.java +++ b/core/src/test/java/io/undertow/server/security/ClientCertRenegotiationTestCase.java @@ -34,6 +34,7 @@ import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.junit.AfterClass; +import org.junit.Assume; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; @@ -67,6 +68,8 @@ protected List getTestMechanisms() { @BeforeClass public static void startSSL() throws Exception { + Assume.assumeTrue("UNDERTOW-2112 New version TLSv1.3 and JDK14 and newer versions are breaking this feature", + getJavaSpecificationVersion() < 14); DefaultServer.startSSLServer(OptionMap.create(SSL_CLIENT_AUTH_MODE, NOT_REQUESTED)); clientSSLContext = DefaultServer.getClientSSLContext(); } @@ -149,4 +152,10 @@ public void testClientCertSuccessWithLargePostBody() throws Exception { HttpClientUtils.readResponse(result); assertSingleNotificationType(EventType.AUTHENTICATED); } + + private static int getJavaSpecificationVersion() { + String versionString = System.getProperty("java.specification.version"); + versionString = versionString.startsWith("1.") ? versionString.substring(2) : versionString; + return Integer.parseInt(versionString); + } }