|
96 | 96 | import java.util.function.Consumer;
|
97 | 97 | import java.util.function.Supplier;
|
98 | 98 | import java.util.function.ToLongFunction;
|
99 |
| -import javax.net.ssl.SSLEngine; |
100 | 99 | import javax.net.ssl.SSLHandshakeException;
|
101 |
| -import javax.net.ssl.SSLParameters; |
102 | 100 | import org.slf4j.Logger;
|
103 | 101 | import org.slf4j.LoggerFactory;
|
104 | 102 |
|
@@ -280,13 +278,6 @@ public void initChannel(SocketChannel ch) {
|
280 | 278 | SslHandler sslHandler =
|
281 | 279 | parameters.sslContext.newHandler(ch.alloc(), parameters.host, parameters.port);
|
282 | 280 |
|
283 |
| - if (parameters.tlsHostnameVerification) { |
284 |
| - SSLEngine sslEngine = sslHandler.engine(); |
285 |
| - SSLParameters sslParameters = sslEngine.getSSLParameters(); |
286 |
| - sslParameters.setEndpointIdentificationAlgorithm("HTTPS"); |
287 |
| - sslEngine.setSSLParameters(sslParameters); |
288 |
| - } |
289 |
| - |
290 | 281 | ch.pipeline().addFirst("ssl", sslHandler);
|
291 | 282 | }
|
292 | 283 | channelCustomizer.accept(ch);
|
@@ -2375,7 +2366,6 @@ public static class ClientParameters {
|
2375 | 2366 | private ChunkChecksum chunkChecksum = JdkChunkChecksum.CRC32_SINGLETON;
|
2376 | 2367 | private MetricsCollector metricsCollector = NoOpMetricsCollector.SINGLETON;
|
2377 | 2368 | private SslContext sslContext;
|
2378 |
| - private boolean tlsHostnameVerification = true; |
2379 | 2369 | private ByteBufAllocator byteBufAllocator;
|
2380 | 2370 | private Duration rpcTimeout;
|
2381 | 2371 | private Consumer<Channel> channelCustomizer = noOpConsumer();
|
@@ -2532,11 +2522,6 @@ public ClientParameters sslContext(SslContext sslContext) {
|
2532 | 2522 | return this;
|
2533 | 2523 | }
|
2534 | 2524 |
|
2535 |
| - public ClientParameters tlsHostnameVerification(boolean tlsHostnameVerification) { |
2536 |
| - this.tlsHostnameVerification = tlsHostnameVerification; |
2537 |
| - return this; |
2538 |
| - } |
2539 |
| - |
2540 | 2525 | public ClientParameters compressionCodecFactory(
|
2541 | 2526 | CompressionCodecFactory compressionCodecFactory) {
|
2542 | 2527 | this.compressionCodecFactory = compressionCodecFactory;
|
|
0 commit comments