|
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 |
|
@@ -283,13 +281,6 @@ public void initChannel(SocketChannel ch) {
|
283 | 281 | SslHandler sslHandler =
|
284 | 282 | parameters.sslContext.newHandler(ch.alloc(), parameters.host, parameters.port);
|
285 | 283 |
|
286 |
| - if (parameters.tlsHostnameVerification) { |
287 |
| - SSLEngine sslEngine = sslHandler.engine(); |
288 |
| - SSLParameters sslParameters = sslEngine.getSSLParameters(); |
289 |
| - sslParameters.setEndpointIdentificationAlgorithm("HTTPS"); |
290 |
| - sslEngine.setSSLParameters(sslParameters); |
291 |
| - } |
292 |
| - |
293 | 284 | ch.pipeline().addFirst("ssl", sslHandler);
|
294 | 285 | }
|
295 | 286 | channelCustomizer.accept(ch);
|
@@ -2397,7 +2388,6 @@ public static class ClientParameters {
|
2397 | 2388 | private ChunkChecksum chunkChecksum = JdkChunkChecksum.CRC32_SINGLETON;
|
2398 | 2389 | private MetricsCollector metricsCollector = NoOpMetricsCollector.SINGLETON;
|
2399 | 2390 | private SslContext sslContext;
|
2400 |
| - private boolean tlsHostnameVerification = true; |
2401 | 2391 | private ByteBufAllocator byteBufAllocator;
|
2402 | 2392 | private Duration rpcTimeout;
|
2403 | 2393 | private Consumer<Channel> channelCustomizer = noOpConsumer();
|
@@ -2554,11 +2544,6 @@ public ClientParameters sslContext(SslContext sslContext) {
|
2554 | 2544 | return this;
|
2555 | 2545 | }
|
2556 | 2546 |
|
2557 |
| - public ClientParameters tlsHostnameVerification(boolean tlsHostnameVerification) { |
2558 |
| - this.tlsHostnameVerification = tlsHostnameVerification; |
2559 |
| - return this; |
2560 |
| - } |
2561 |
| - |
2562 | 2547 | public ClientParameters compressionCodecFactory(
|
2563 | 2548 | CompressionCodecFactory compressionCodecFactory) {
|
2564 | 2549 | this.compressionCodecFactory = compressionCodecFactory;
|
|
0 commit comments