mirror of https://github.com/grpc/grpc-java.git
netty: Avoid clearing SSLParameters
Since Netty may have set some parameters already, we should modify the existing SSLParameters instead of starting from scratch. This may fix ALPN with JDK9, but full support for ALPN with JDK9 is still later work and we're not supporting it yet. Fixes #3532
This commit is contained in:
parent
9ecb4c3da7
commit
b026ea544c
|
|
@ -304,7 +304,7 @@ public final class ProtocolNegotiators {
|
|||
@Override
|
||||
public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
|
||||
SSLEngine sslEngine = sslContext.newEngine(ctx.alloc(), host, port);
|
||||
SSLParameters sslParams = new SSLParameters();
|
||||
SSLParameters sslParams = sslEngine.getSSLParameters();
|
||||
sslParams.setEndpointIdentificationAlgorithm("HTTPS");
|
||||
sslEngine.setSSLParameters(sslParams);
|
||||
ctx.pipeline().replace(this, null, new SslHandler(sslEngine, false));
|
||||
|
|
|
|||
Loading…
Reference in New Issue