请把你的JDK版本升至1.8_291版本以上,原因请见8u291发行说明:
https://www.oracle.com/java/technologies/javase/8u291-relnotes.html
禁用了TLS 1.0 和 1.1 的协议版本,并已被更安全和现代的版本(TLS 1.2 和 1.3)取代。
测试是否支持版本:
public static void main(String[] args) throws Exception {
SSLContext context = SSLContext.getInstance("TLS");
context.init(null, null, null);
SSLSocketFactory factory = (SSLSocketFactory) context.getSocketFactory();
SSLSocket socket = (SSLSocket) factory.createSocket();
String[] protocols = socket.getSupportedProtocols();
System.out.println("Supported Protocols: " + protocols.length);
for (int i = 0; i < protocols.length; i++) {
System.out.println(" " + protocols[i]);
}
protocols = socket.getEnabledProtocols();
System.out.println("Enabled Protocols: " + protocols.length);
for (int i = 0; i < protocols.length; i++) {
System.out.println(" " + protocols[i]);
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)