在将java升级到version 17之后,我正在尝试连接Springboot 2.7.5中的Server 13
这是应用程序启动并尝试连接时的堆栈跟踪的关键点。
Failed to obtain JDBC Connection; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: \"Certificates do not conform to algorithm constraints\". ClientConnectionId:3dd8afba-ccaf-451e-a8f1-5687b548ee3b\
java.security.cert.CertPathValidatorException: Algorithm constraints check failed on keysize limits: RSA 1024 bit key used with certificate: CN={SERVER_URL}
我尝试将encrypt=true
和trustServerCertificate=true
添加到连接url中,但仍然存在相同的问题。
我应该能够使用com.microsoft.sqlserver:mssql-jdbc:11.2.0.jre17
,也降低了主要版本的评级,也得到了同样的结果。
我能够使用相同的cred连接服务器,使用配置为使用java 17和使用驱动程序11.2.1
的intellij
发布于 2022-11-14 09:29:28
我发现了这个问题,因为RHEL8已经删除了弱密码算法。因此,我不得不更新Docker文件以获得RUN update-crypto-policies --set LEGACY
,也可以参见https://access.redhat.com/articles/3642912
https://stackoverflow.com/questions/74363828
复制相似问题