|
16 | 16 |
|
17 | 17 | package org.springframework.cloud.gateway.config;
|
18 | 18 |
|
| 19 | +import java.io.IOException; |
19 | 20 | import java.security.KeyStore;
|
20 | 21 | import java.security.KeyStoreException;
|
21 | 22 | import java.security.NoSuchAlgorithmException;
|
| 23 | +import java.security.cert.CertificateException; |
22 | 24 | import java.util.List;
|
23 | 25 | import java.util.Set;
|
24 | 26 | import java.util.function.Supplier;
|
|
188 | 190 | * @author Mete Alpaslan Katırcıoğlu
|
189 | 191 | * @author Alberto C. Ríos
|
190 | 192 | * @author Olga Maciaszek-Sharma
|
191 |
| - * @author Dominic Niemann |
192 | 193 | */
|
193 | 194 | @Configuration(proxyBeanMethods = false)
|
194 | 195 | @ConditionalOnProperty(name = "spring.cloud.gateway.enabled", matchIfMissing = true)
|
@@ -274,8 +275,8 @@ public RouteRefreshListener routeRefreshListener(ApplicationEventPublisher publi
|
274 | 275 |
|
275 | 276 | @Bean
|
276 | 277 | @ConditionalOnMissingBean
|
277 |
| - public FilteringWebHandler filteringWebHandler(List<GlobalFilter> globalFilters, GatewayProperties properties) { |
278 |
| - return new FilteringWebHandler(globalFilters, properties.isRouteFilterCacheEnabled()); |
| 278 | + public FilteringWebHandler filteringWebHandler(List<GlobalFilter> globalFilters) { |
| 279 | + return new FilteringWebHandler(globalFilters); |
279 | 280 | }
|
280 | 281 |
|
281 | 282 | @Bean
|
@@ -356,10 +357,12 @@ public JsonToGrpcGatewayFilterFactory jsonToGRPCFilterFactory(GrpcSslConfigurer
|
356 | 357 | @ConditionalOnMissingBean(GrpcSslConfigurer.class)
|
357 | 358 | @ConditionalOnClass(name = "io.grpc.Channel")
|
358 | 359 | public GrpcSslConfigurer grpcSslConfigurer(HttpClientProperties properties, SslBundles bundles)
|
359 |
| - throws KeyStoreException, NoSuchAlgorithmException { |
| 360 | + throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException { |
360 | 361 | TrustManagerFactory trustManagerFactory = TrustManagerFactory
|
361 | 362 | .getInstance(TrustManagerFactory.getDefaultAlgorithm());
|
362 |
| - trustManagerFactory.init(KeyStore.getInstance(KeyStore.getDefaultType())); |
| 363 | + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); |
| 364 | + keyStore.load(null); |
| 365 | + trustManagerFactory.init(keyStore); |
363 | 366 |
|
364 | 367 | return new GrpcSslConfigurer(properties.getSsl(), bundles);
|
365 | 368 | }
|
|
0 commit comments