com.microsoft.sqlserver.jdbc.SQLServerException: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。

jdk 1.8.0_74升级jdk1.8.0_202后,启动Java Web项目出现连接数据库错误,信息如标题所示。

经过一番网上搜索,最终解决方案如下:

\jdk1.8.0_202\jre\lib\security 修改java.security文件,去掉 , 3DES_EDE_CBC,启用旧的算法。 

原出处:https://www.pianshen.com/article/7277315273/

 -------------------------------------------------------

顺便说下,升级jdk1.8.0_202后,原需要下载JCE进行解密的jar包,不再需要,根据官方说明,在jdk1.8.0_161后,此功能已默认可用。

Current versions of the JDK do not require separate unlimited policy files.
They are provided for use with older versions.

The unlimited policy files for earlier releases are required only for
JDK 8 updates earlier than 8u161.

On later versions unlimited strength cryptographic algorithms are
available by default.

See https://bugs.openjdk.java.net/browse/JDK-8170157 for details.

The information provided below is relevant to old JDK versions only.
 

你可能感兴趣的:(ssl,jce,java升级)