Microsoft SQL server "Could not establish a secure SQL Server connection using SSL encryption"
X
Xavier Meunier
started a topic
about 1 year ago
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
Best Answer
X
Xavier Meunier
said
about 1 year ago
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 Comment
X
Xavier Meunier
said
about 1 year ago
Answer
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.
Xavier Meunier
Case:
The Runtime fails to connect to a MSSQL server.
Error message is
The MSSQL JDBC driver version is 10.2 or higher
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.
Xavier Meunier
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.