【发布时间】:2017-02-23 12:33:25
【问题描述】:
我们尝试了以下代码来识别 java 版本 1.7.0_79 支持的协议
SSLSocketFactory factory = (SSLSocketFactory) SSLSocketFactory.getDefault();
SSLSocket soc = (SSLSocket) factory.createSocket();
// Returns the names of the protocol versions which are
// currently enabled for use on this connection.
String[] protocols = soc.getEnabledProtocols();
System.out.println("Enabled protocols:");
for (String s : protocols) {
System.out.println(s);
}
上述程序的输出..
1.7.0_79
Enabled protocols:
TLSv1
为了支持 TLSv1.1,我们尝试了以下选项
- 参考link 用
-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2执行的程序,但它不起作用,它只显示TLSv1。 -
然后参考link,我们添加了后续行
jdk.tls.disabledAlgorithms= SSLv2Hello, SSLv3, TLSv1, TLSv1.1
在 java.security 中也没有帮助。有人可以帮助确定要在 jdk 1.7.0_79 中进行的更改吗?
【问题讨论】: