Skip to content

Commit 2f11b16

Browse files
committed
Use org.bouncycastle:bcprov-jdk15on for using SelfSignedCertificate in test scope.
Motivation SelfSignedCertificate does not seem to work anymore with most recent Java 8 OpenJDK distributions, we need to use instead Bouncy Castle APIs.
1 parent d9eb309 commit 2f11b16

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

vertx-core/pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
<properties>
2929
<apacheds-protocol-dns.version>2.0.0.AM27</apacheds-protocol-dns.version>
30+
<org.bouncycastle.version>1.69</org.bouncycastle.version>
3031
<generated.dir>${project.basedir}/src/main/generated</generated.dir>
3132
<jmh.version>1.37</jmh.version>
3233
<vertx.surefire.nettyTransport>jdk</vertx.surefire.nettyTransport>
@@ -155,6 +156,12 @@
155156
<groupId>org.apache.directory.server</groupId>
156157
<artifactId>apacheds-protocol-dns</artifactId>
157158
<version>${apacheds-protocol-dns.version}</version>
159+
<exclusions>
160+
<exclusion>
161+
<groupId>bouncycastle</groupId>
162+
<artifactId>bcprov-jdk15</artifactId>
163+
</exclusion>
164+
</exclusions>
158165
<scope>test</scope>
159166
</dependency>
160167
<dependency>
@@ -173,6 +180,19 @@
173180
<artifactId>log4j-core</artifactId>
174181
<scope>test</scope>
175182
</dependency>
183+
184+
<dependency>
185+
<groupId>org.bouncycastle</groupId>
186+
<artifactId>bcpkix-jdk15on</artifactId>
187+
<version>${org.bouncycastle.version}</version>
188+
<scope>test</scope>
189+
</dependency>
190+
<dependency>
191+
<groupId>org.bouncycastle</groupId>
192+
<artifactId>bcprov-jdk15on</artifactId>
193+
<version>${org.bouncycastle.version}</version>
194+
</dependency>
195+
176196
<dependency>
177197
<groupId>io.netty</groupId>
178198
<artifactId>netty-tcnative-boringssl-static</artifactId>

vertx-core/src/test/java/io/vertx/tests/net/NetTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,6 @@ public void testSpecificTlsProtocolVersion() throws Exception {
13781378

13791379
@Test
13801380
public void testTLSTrailingDotHost() throws Exception {
1381-
assumeTrue(PlatformDependent.javaVersion() < 9);
13821381
// We just need a vanilla cert for this test
13831382
SelfSignedCertificate cert = SelfSignedCertificate.create("host2.com");
13841383
TLSTest test = new TLSTest()

vertx-core/src/test/java/io/vertx/tests/tls/HttpTLSTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,6 @@ public void testTLSMatchingProtocolVersions() throws Exception {
324324
@Test
325325
// Provide an host name with a trailing dot
326326
public void testTLSTrailingDotHost() throws Exception {
327-
assumeTrue(PlatformDependent.javaVersion() < 9);
328327
// We just need a vanilla cert for this test
329328
SelfSignedCertificate cert = SelfSignedCertificate.create("host2.com");
330329
TLSTest test = testTLS(Cert.NONE, cert::trustOptions, cert::keyCertOptions, Trust.NONE)

0 commit comments

Comments
 (0)