Skip to content

Conversation

rzikm
Copy link
Member

@rzikm rzikm commented Sep 30, 2025

This would improve error messages in cases like #120257


    System.Net.Http.Functional.Tests.HttpClientHandlerTest_Http3.Public_Interop_ExactVersion_BufferContent_Success(uri: "https://quic.nginx.org/") [FAIL]
      System.Net.Http.HttpRequestException : Authentication failed because the remote party sent a TLS alert: '112'. (quic.nginx.org:443)
      ---- System.Security.Authentication.AuthenticationException : Authentication failed because the remote party sent a TLS alert: '112'.

After this PR, it would read TLS alert 'UnrecognizedName'.

@Copilot Copilot AI review requested due to automatic review settings September 30, 2025 14:49
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances TLS alert message handling by adding missing alert types and fixing enum naming inconsistencies. The changes improve error message clarity by providing meaningful alert names instead of numeric codes.

Key changes:

  • Added 12 missing TLS alert message enum values including commonly encountered alerts like UnrecognizedName and CertificateRequired
  • Fixed spelling inconsistencies in enum names (InsuffientSecurityInsufficientSecurity, UnsupportedExtUnsupportedExtension)
  • Updated corresponding unit tests to use the corrected enum names

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/libraries/Common/src/System/Net/Security/TlsAlertMessage.cs Added missing TLS alert enum values and fixed spelling in existing enum names
src/libraries/System.Net.Security/tests/UnitTests/TlsAlertsMatchWindowsInterop.cs Updated test assertions to use corrected enum names

@rzikm rzikm requested a review from a team September 30, 2025 14:50
@rzikm rzikm changed the title Add missing TlsAlertMessages and fix test build issues Add missing TlsAlertMessage members Sep 30, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

@rzikm
Copy link
Member Author

rzikm commented Oct 1, 2025

/ba-g System.Security.Cryptography.Tests.WorkItemExecution failure is unrelated

@rzikm rzikm merged commit f6f2abd into dotnet:main Oct 1, 2025
87 of 90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants