centos8 发布 springboot,连接mssql异常
com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Server chose TLSv1, but that protocol version is not enabled or not supported by the client.".
解决方案
# 启用TLSv1
vi /etc/crypto-policies/back-ends/opensslcnf.config
# MinProtocol = TLSv1.2
MinProtocol = TLSv1
MaxProtocol = TLSv1.3
# 更新加密策略,有效!
update-crypto-policies --set LEGACY