1

在深入研究我的问题时,解释了 atg gRpc with TLS Client Authentication using SunPKCS11 in netty failed,我更改了 netty-tcnative-boringssl 的版本。我的 build.gradle 中的 cange 来自

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

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

导致:

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

我这样做是因为根据 netty 的 javadocSslContextBuilder's keyManager(KeyManagerFactory factory)方法也适用于作为提供者的 OpenSSL,它不适用于版本 1.1.33.Fork26。

现在,在新版本中,netty 的 slf4j 调试输出告诉我:

[main] 调试 io.netty.handler.ssl.OpenSsl - netty-tcnative 不在类路径中;OpenSslEngine 将不可用

所以netty-tcnative的检测似乎失败了。调试到 io.netty.handler.ssl.OpenSsl的静态代码块,检测失败,因为

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

抛出异常。我做错了什么,或者这是近年来问题的一些复苏(https://github.com/relayrides/pushy/issues/303https://github.com/netty/netty-tcnative/issues/136) ? // 使用 Oracle Java 1.8.21 在 64 位 Win 10 上工作

4

1 回答 1

0

Grpc Java 1.3.0 不支持netty 2 .. 等待并更新到 gRPC java 1.4.0 做到了开箱即用,因为对 netty 2 的支持包含在提交https://github.com/grpc/grpc-java/commit/67eefa69b4009948ac664691e719f683c4478290中。

于 2017-06-12T06:05:30.517 回答