Remove pinned TLS 1.2 security protocol to enable modern TLS negotiation #307
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The code was explicitly pinning the TLS protocol version to 1.2 using:
This hardcoded setting in the
GenerateSnippetsAsyncmethod prevented the application from:Solution
Removed the explicit TLS version pinning from
ApiDoctor.Console/Program.cs(line 1957). The application now relies on .NET 8.0's secure default behavior.Benefits
Enhanced Security: The application can now use TLS 1.3 when available, which provides better security and performance compared to TLS 1.2
System-Managed Security: .NET 8.0 defaults to
SecurityProtocolType.SystemDefault, which allows the operating system to automatically select the most secure protocol availableBackward Compatible: TLS 1.2 remains supported for connections to legacy servers, ensuring no breaking changes to existing functionality
Future-Proof: The application will automatically benefit from future TLS protocol improvements without requiring code changes
Technical Details
In modern .NET (Core 2.1+ and .NET 5+), the default
SecurityProtocolisSystemDefault, which:Testing
Fixes #<issue_number>
Original prompt
Fixes #306
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.