Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
spencergibb committed Nov 19, 2024
1 parent 0600b4d commit 53310ab
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ protected HttpClientProperties.Ssl getSslProperties() {
}

protected SslBundle getBundle() {
if(ssl.getSslBundle() == null || ssl.getSslBundle().length() > 0) {
if (ssl.getSslBundle() == null || ssl.getSslBundle().length() > 0) {
return null;
}
if(bundles.getBundleNames().contains(ssl.getSslBundle())) {
if (bundles.getBundleNames().contains(ssl.getSslBundle())) {
return bundles.getBundle(ssl.getSslBundle());
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,7 @@ public void customize(NettyReactiveWebServerFactory factory) {

@Bean
public HttpClientSslConfigurer httpClientSslConfigurer(ServerProperties serverProperties,
HttpClientProperties httpClientProperties,
SslBundles bundles) {
HttpClientProperties httpClientProperties, SslBundles bundles) {
return new HttpClientSslConfigurer(httpClientProperties.getSsl(), serverProperties, bundles) {
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public class HttpClientSslConfigurer extends AbstractSslConfigurer<HttpClient, H

private final ServerProperties serverProperties;

public HttpClientSslConfigurer(HttpClientProperties.Ssl sslProperties, ServerProperties serverProperties, SslBundles bundles) {
public HttpClientSslConfigurer(HttpClientProperties.Ssl sslProperties, ServerProperties serverProperties,
SslBundles bundles) {
super(sslProperties, bundles);
this.serverProperties = serverProperties;
}
Expand Down Expand Up @@ -67,7 +68,7 @@ else if (bundle != null) {
}

try {
if(bundle != null) {
if (bundle != null) {
sslContextBuilder.keyManager(bundle.getManagers().getKeyManagerFactory());
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,7 @@ CustomHttpClientFactory customHttpClientFactory(HttpClientProperties properties,
@Bean
@Primary
CustomSslConfigurer customSslContextFactory(ServerProperties serverProperties,
HttpClientProperties httpClientProperties,
SslBundles bundles) {
HttpClientProperties httpClientProperties, SslBundles bundles) {
return new CustomSslConfigurer(httpClientProperties.getSsl(), serverProperties, bundles);
}

Expand All @@ -365,6 +364,7 @@ SslBundles sslBundleRegistry(ObjectProvider<SslBundleRegistrar> sslBundleRegistr
});
return registry;
}

}

protected static class CustomHttpClientFactory extends HttpClientFactory {
Expand Down Expand Up @@ -408,7 +408,8 @@ protected static class CustomSslConfigurer extends HttpClientSslConfigurer {

boolean insecureTrustManagerSet;

protected CustomSslConfigurer(HttpClientProperties.Ssl sslProperties, ServerProperties serverProperties, SslBundles bundles) {
protected CustomSslConfigurer(HttpClientProperties.Ssl sslProperties, ServerProperties serverProperties,
SslBundles bundles) {
super(sslProperties, serverProperties, bundles);
}

Expand Down

0 comments on commit 53310ab

Please sign in to comment.