更新时间:2021-09-07 21:48:12
在您的代码中,您正在创建和初始化SSLContext
,但没有使用它.也许您应该替换:
In your code your are creating and initializing a SSLContext
but not using it. Maybe you should replace :
urlConnection.setSSLSocketFactory(CertificateManager.getInstance().getSslContext().getSocketFactory());
作者
urlConnection.setSSLSocketFactory(sslContext.getSocketFactory());
我还建议您尽可能将选项-Djavax.net.debug=all
传递给JVM.它将在标准输出上打印有关SSL连接和握手的详细信息.
I also suggest you if possible to pass the option -Djavax.net.debug=all
to the JVM. It will print detailed information about the SSL connection and handshake on the standard output.