This commit is contained in:
Andy Wilkinson
2018-03-17 15:28:05 +00:00
parent 626e488da5
commit 72e36eadae
3 changed files with 14 additions and 23 deletions

View File

@@ -64,11 +64,9 @@ class ReactiveCloudFoundrySecurityService {
}
protected ReactorClientHttpConnector buildTrustAllSslConnector() {
return new ReactorClientHttpConnector(
(options) -> options.sslSupport((sslContextBuilder) -> {
sslContextBuilder.sslProvider(SslProvider.JDK)
.trustManager(InsecureTrustManagerFactory.INSTANCE);
}));
return new ReactorClientHttpConnector((options) -> options.sslSupport(
(sslContextBuilder) -> sslContextBuilder.sslProvider(SslProvider.JDK)
.trustManager(InsecureTrustManagerFactory.INSTANCE)));
}
/**

View File

@@ -83,13 +83,10 @@ public class IntegrationAutoConfigurationTests {
@Test
public void parentContext() {
this.contextRunner.run((context) -> {
this.contextRunner.withParent(context)
.withPropertyValues("spring.jmx.default_domain=org.foo")
.run((child) -> {
assertThat(child).hasSingleBean(HeaderChannelRegistry.class);
});
});
this.contextRunner.run((context) -> this.contextRunner.withParent(context)
.withPropertyValues("spring.jmx.default_domain=org.foo")
.run((child) -> assertThat(child)
.hasSingleBean(HeaderChannelRegistry.class)));
}
@Test

View File

@@ -137,11 +137,9 @@ public abstract class AbstractReactiveWebServerFactoryTests {
}
protected ReactorClientHttpConnector buildTrustAllSslConnector() {
return new ReactorClientHttpConnector(
(options) -> options.sslSupport((sslContextBuilder) -> {
sslContextBuilder.sslProvider(SslProvider.JDK)
.trustManager(InsecureTrustManagerFactory.INSTANCE);
}));
return new ReactorClientHttpConnector((options) -> options.sslSupport(
(sslContextBuilder) -> sslContextBuilder.sslProvider(SslProvider.JDK)
.trustManager(InsecureTrustManagerFactory.INSTANCE)));
}
@Test
@@ -174,12 +172,10 @@ public abstract class AbstractReactiveWebServerFactoryTests {
KeyManagerFactory clientKeyManagerFactory = KeyManagerFactory
.getInstance(KeyManagerFactory.getDefaultAlgorithm());
clientKeyManagerFactory.init(clientKeyStore, "password".toCharArray());
return new ReactorClientHttpConnector(
(options) -> options.sslSupport((sslContextBuilder) -> {
sslContextBuilder.sslProvider(SslProvider.JDK)
.trustManager(InsecureTrustManagerFactory.INSTANCE)
.keyManager(clientKeyManagerFactory);
}));
return new ReactorClientHttpConnector((options) -> options.sslSupport(
(sslContextBuilder) -> sslContextBuilder.sslProvider(SslProvider.JDK)
.trustManager(InsecureTrustManagerFactory.INSTANCE)
.keyManager(clientKeyManagerFactory)));
}
protected void testClientAuthSuccess(Ssl sslConfiguration,