Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
medwards8 opened this issue Mar 17, 2022 · 3 comments

Comments

@medwards8
Copy link

Driver version

mssql-jdbc-10.2.0.jre8

SQL Server version

Microsoft SQL Server 2019 (RTM-GDR) (KB4583458) - 15.0.2080.9 (X64) Nov 6 2020 16:50:01 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Enterprise 10.0 (Build 19042: ) (Hypervisor)

Client Operating System

Windows 10 Enterprise 10.0

JAVA/JVM version

2022-03-17_10-32-32

Error I'm currently getting:
2022-03-17_09-51-52

Content of config file it is referencing:
2022-03-17_10-49-39

Doing this same process on 8.5.1 it runs perfectly fine, only get this error on 8.5.4. I have tried:

-Updating java version
-adding trustServerCertificate=true
-specifying username/password
-sslProtocol=TLSv1/v1.2

Produces same error every time.

@VeryVerySpicy
Copy link
Contributor

Hi @medwards8 ,
Thanks for reaching out to us. We will take a look soon.

As a quick check, can you add trustServerCertificate=true to your connection string and try again?

@medwards8
Copy link
Author

Hi @v-zhangw thanks that seems to work now. Strange I'm sure I tried adding that in, I must have done some other configuring in the meantime

@VeryVerySpicy
Copy link
Contributor

No problem. The unable to find valid certification path error usually means an issue with certificates set up. Using trustservercertificate is a quick fix if you can use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants