GeezerVison is showing github.com — Merge pull request #1353 from kstekovi/UNDERTOW-2112_2.2.x · undertow-io/undertow@9a06b56
File tree
Expand file treeCollapse file tree
Open diff view settings
core/src/test/java/io/undertow/server/security
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: core/src/test/java/io/undertow/server/security/ClientCertRenegotiationTestCase.java +9Lines changed: 9 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
34 | 34 | import org.apache.http.client.methods.HttpPost; |
35 | 35 | import org.apache.http.entity.StringEntity; |
36 | 36 | import org.junit.AfterClass; |
| 37 | +import org.junit.Assume; |
37 | 38 | import org.junit.BeforeClass; |
38 | 39 | import org.junit.Test; |
39 | 40 | import org.junit.runner.RunWith; |
@@ -67,6 +68,8 @@ protected List<AuthenticationMechanism> getTestMechanisms() { |
67 | 68 |
|
68 | 69 | @BeforeClass |
69 | 70 | 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); |
70 | 73 | DefaultServer.startSSLServer(OptionMap.create(SSL_CLIENT_AUTH_MODE, NOT_REQUESTED)); |
71 | 74 | clientSSLContext = DefaultServer.getClientSSLContext(); |
72 | 75 | } |
@@ -149,4 +152,10 @@ public void testClientCertSuccessWithLargePostBody() throws Exception { |
149 | 152 | HttpClientUtils.readResponse(result); |
150 | 153 | assertSingleNotificationType(EventType.AUTHENTICATED); |
151 | 154 | } |
| 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 | + } |
152 | 161 | } |