The driver cannot establish a secure connection with SQL Server by using Secure Sockets Layer (SSL) encryption (when the front-end and back-end interfaces are adjusted, the background reports a jdk17 error)

The author uses Open JDK 17, SQL Server 2016, and uses JPA to operate the database in the project. The test environment is fine, but the production environment has the error "The driver cannot establish a secure connection with SQL Server by using Secure Sockets Layer (SSL) encryption" as shown in the title. For the solution, refer to StackOverflow.

1)打开JAVA_HOME/conf/security/java.security

2) Query jdk.tls.disabledAlgorithms

3) Modify

From code A, modify to code B

code A

jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \
    DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL

code B

jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, \
    DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL

Guess you like

Origin blog.csdn.net/qq_45991812/article/details/127420554