val jdkSslClientContext = new JdkSslContext(sslContext, true, ClientAuth.REQUIRE)
val sslChannel = NettyChannelBuilder
.forAddress(host, sslPort)
.negotiationType(NegotiationType.TLS)
.sslContext(jdkSslClientContext)
.build()
However, when running this code (on a mac), I get the following exception:java.lang.IllegalArgumentException: ALPN must be enabled and list HTTP/2 as a supported protocol.at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)at io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts.ensureAlpnAndH2Enabled(GrpcSslContexts.java:184)at io.grpc.netty.shaded.io.grpc.netty.NettyChannelBuilder.sslContext(NettyChannelBuilder.java:187)
I've done some digging online and come across this page: https://github.com/grpc/grpc-java/blob/master/SECURITY.md. I've done the recommended approach of using netty-tcnative-boringssl by adding it into my build.sbt as follows (for multiple versions as well):"io.netty" % "netty-tcnative-boringssl-static" % "2.0.8.Final"