问题描述
sqlserver连接报错:
java.lang.IllegalArgumentException: open() failed.The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "The server selected protocol version TLS10 is not accepted by client preferences [TLS12]
解决方案:
根据环境变量配置中 jre 的地址
JAVA_HOME下的jre/lib/security/java.security
jdk.tls.disabledAlgorithm修改
将 TLSv1, TLSv1.1, 3DES_EDE_CBC 删除即可
最后效果:
jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, \
DH keySize < 1024, EC keySize < 224, anon, NULL, \
include jdk.disabled.namedCurves
无效修改
改错了keyjdk.tls.legacyAlgorithms
这两个很相似注意看
keyjdk.tls.legacyAlgorithms 错误的
jdk.tls.disabledAlgorithm正确的
错误视图