1
votes

While looking deeper into my issue, explained atg gRpc with TLS Client Authentication using SunPKCS11 in netty fails, I changed the version of netty-tcnative-boringssl. The cange in my build.gradle was from

compile 'io.netty:netty-tcnative-boringssl-static:1.1.33.Fork26' 

to

compile 'io.netty:netty-tcnative-boringssl-static:+'

resulting in:

+--- io.netty:netty-tcnative-boringssl-static:+ -> 2.0.1.Final

I did this, because according to netty's javadoc SslContextBuilder's keyManager(KeyManagerFactory factory) method also works for OpenSSL as provider, which it does not for version 1.1.33.Fork26.

Now, with the new version the slf4j debug output of netty tells me:

[main] DEBUG io.netty.handler.ssl.OpenSsl - netty-tcnative not in the classpath; OpenSslEngine will be unavailable

So the detection of netty-tcnative seems to fail. Debugging into io.netty.handler.ssl.OpenSsl's static code block, the detection fails, because

Class.forName("org.apache.tomcat.jni.SSL", false, OpenSsl.class.getClassLoader());

throws an exception. Do I do something wrong, or is this some resurgence of lat years issues (https://github.com/relayrides/pushy/issues/303 and https://github.com/netty/netty-tcnative/issues/136)? // working on 64 bit Win 10 with Oracle Java 1.8.21

1

1 Answers

0
votes

Grpc Java 1.3.0 did not support netty version 2.. Waiting and updating to gRPC java 1.4.0 did the trick out of the box, as support for netty 2. was included with commit https://github.com/grpc/grpc-java/commit/67eefa69b4009948ac664691e719f683c4478290.