Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ihostage committed Dec 25, 2023
1 parent 0b6851b commit ffa4684
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ object NettyClientUtils {
private def createNettySslContext(javaSslContext: SSLContext): SslContext = {
import io.grpc.netty.shaded.io.netty.handler.ssl.{
ApplicationProtocolConfig,
ApplicationProtocolNames,
ClientAuth,
IdentityCipherSuiteFilter,
JdkSslContext
Expand All @@ -195,8 +196,12 @@ object NettyClientUtils {
/* boolean isClient */ true,
/* Iterable<String> ciphers */ null, // use JDK defaults (null is accepted as indicated in constructor Javadoc)
IdentityCipherSuiteFilter.INSTANCE,
/* ApplicationProtocolConfig apn */ ApplicationProtocolConfig.DISABLED, // use JDK default (null would also be acceptable, DISABLED config will select the NONE protocol and thus the JdkDefaultApplicationProtocolNegotiator)
ClientAuth.NONE, // server-only option, which is ignored as isClient=true (as indicated in constructor Javadoc)
new ApplicationProtocolConfig(
ApplicationProtocolConfig.Protocol.ALPN,
ApplicationProtocolConfig.SelectorFailureBehavior.NO_ADVERTISE,
ApplicationProtocolConfig.SelectedListenerFailureBehavior.ACCEPT,
ApplicationProtocolNames.HTTP_2),
ClientAuth.OPTIONAL, // server-only option, which is ignored as isClient=true (as indicated in constructor Javadoc)
/* String[] protocols */ null, // use JDK defaults (null is accepted as indicated in constructor Javadoc)
/* boolean startTls */ false)
}
Expand Down

0 comments on commit ffa4684

Please sign in to comment.