diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/ClientHttpRequestFactoriesOkHttp3Tests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/ClientHttpRequestFactoriesOkHttp3Tests.java index 35c0e509e05..59e4c314447 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/ClientHttpRequestFactoriesOkHttp3Tests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/ClientHttpRequestFactoriesOkHttp3Tests.java @@ -19,7 +19,6 @@ package org.springframework.boot.web.client; import java.io.File; import okhttp3.OkHttpClient; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.boot.testsupport.classpath.ClassPathExclusions; @@ -67,9 +66,4 @@ class ClientHttpRequestFactoriesOkHttp3Tests return ((OkHttpClient) ReflectionTestUtils.getField(requestFactory, "client")).readTimeoutMillis(); } - @Override - @Disabled("OkHostnameVerifier fails because the JSK doesn't have a type 2 SubjectAltName") - void connectWithSslBundle() throws Exception { - } - } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/ClientHttpRequestFactoriesOkHttp4Tests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/ClientHttpRequestFactoriesOkHttp4Tests.java index 04b52ca5b60..13158708f54 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/ClientHttpRequestFactoriesOkHttp4Tests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/client/ClientHttpRequestFactoriesOkHttp4Tests.java @@ -19,7 +19,6 @@ package org.springframework.boot.web.client; import java.io.File; import okhttp3.OkHttpClient; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.boot.testsupport.classpath.ClassPathExclusions; @@ -65,9 +64,4 @@ class ClientHttpRequestFactoriesOkHttp4Tests return ((OkHttpClient) ReflectionTestUtils.getField(requestFactory, "client")).readTimeoutMillis(); } - @Override - @Disabled("OkHostnameVerifier fails because the JSK doesn't have a type 2 SubjectAltName") - void connectWithSslBundle() throws Exception { - } - } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java index f0d79128fad..65a87bbdc45 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java @@ -458,7 +458,7 @@ public abstract class AbstractServletWebServerFactoryTests { new ExampleServlet(true, false), "/hello"); this.webServer = factory.getWebServer(registration); this.webServer.start(); - TrustStrategy trustStrategy = new SerialNumberValidatingTrustSelfSignedStrategy("3a3aaec8"); + TrustStrategy trustStrategy = new SerialNumberValidatingTrustSelfSignedStrategy("6454C1DC"); SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, trustStrategy).build(); PoolingHttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder.create() .setSSLSocketFactory(new SSLConnectionSocketFactory(sslContext)) @@ -1628,7 +1628,7 @@ public abstract class AbstractServletWebServerFactoryTests { @Override public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException { String hexSerialNumber = chain[0].getSerialNumber().toString(16); - boolean isMatch = hexSerialNumber.equals(this.serialNumber); + boolean isMatch = hexSerialNumber.equalsIgnoreCase(this.serialNumber); return super.isTrusted(chain, authType) && isMatch; } diff --git a/spring-boot-project/spring-boot/src/test/resources/test.jks b/spring-boot-project/spring-boot/src/test/resources/test.jks index 0fc3e802f75..4601dc3969d 100644 Binary files a/spring-boot-project/spring-boot/src/test/resources/test.jks and b/spring-boot-project/spring-boot/src/test/resources/test.jks differ