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

Suppress TLS security warning with Encrypt=false by new AppContext switch #1457

Merged
merged 2 commits into from
Jan 11, 2022

Conversation

DavoudEshtehari
Copy link
Contributor

@DavoudEshtehari DavoudEshtehari commented Jan 7, 2022

fixes #1434

When connecting to a server, if a protocol lower than TLS 1.2 is negotiated, a security warning is output to the console. This warning can be suppressed on SQL connections with Encrypt = false by enabling the following AppContext switch on application startup:

Switch.Microsoft.Data.SqlClient.SuppressInsecureTLSWarning

BUILDGUIDE.md Outdated Show resolved Hide resolved
BUILDGUIDE.md Outdated Show resolved Hide resolved
BUILDGUIDE.md Outdated Show resolved Hide resolved
@JRahnama JRahnama modified the milestones: 5.0.0-preview1, 4.0.1 Jan 11, 2022
@JRahnama JRahnama merged commit 1ad4af3 into dotnet:main Jan 11, 2022
DavoudEshtehari added a commit to DavoudEshtehari/SqlClient that referenced this pull request Jan 13, 2022
…itch (dotnet#1457)

# Conflicts:
#	src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs
#	src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/TdsParser.cs
@DavoudEshtehari DavoudEshtehari modified the milestones: 4.0.1, 5.0.0-preview1 Jan 13, 2022
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

Successfully merging this pull request may close these issues.

Turn Off "Security Warning "The negotiated TLS 1.0..." if Encrypt=false passed in Connection String
4 participants