Commencer un nouveau sujet
Répondu

Microsoft SQL server "Could not establish a secure SQL Server connection using SSL encryption"

Case:

The Runtime fails to connect to a MSSQL server.

Error message is

The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption.

The MSSQL JDBC driver version is 10.2 or higher


Meilleure réponse

Explanation

Since version 10.2, the Microsoft JDBC SQL Driver enables TLS encryption by default (notified as "BREAKING CHANGE" on the release notes).

This breaks existing stored SQL Server connections if they rely on encryption being off (the previous default).


Solution
You can either:

1. update your MSSQL JDBC connection url, appending either ";encrypt=false" or ";trustServerCertificate=true", to get back to the same security conditions as with former driver versions (this might affect the security of your database connection),

2. or set the encryption mechanism properly for your connection.

1 commentaire

Réponse

Explanation

Since version 10.2, the Microsoft JDBC SQL Driver enables TLS encryption by default (notified as "BREAKING CHANGE" on the release notes).

This breaks existing stored SQL Server connections if they rely on encryption being off (the previous default).


Solution
You can either:

1. update your MSSQL JDBC connection url, appending either ";encrypt=false" or ";trustServerCertificate=true", to get back to the same security conditions as with former driver versions (this might affect the security of your database connection),

2. or set the encryption mechanism properly for your connection.

Connexion pour poster un commentaire