quic: send correct OpenSSL alert for ALPN mismatches#63193
Open
pimterry wants to merge 1 commit intonodejs:mainfrom
Open
quic: send correct OpenSSL alert for ALPN mismatches#63193pimterry wants to merge 1 commit intonodejs:mainfrom
pimterry wants to merge 1 commit intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
Signed-off-by: Tim Perry <pimterry@gmail.com>
jasnell
approved these changes
May 8, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #63193 +/- ##
========================================
Coverage 90.03% 90.04%
========================================
Files 713 713
Lines 224510 224926 +416
Branches 42438 42533 +95
========================================
+ Hits 202148 202535 +387
- Misses 14163 14175 +12
- Partials 8199 8216 +17 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Currently if the QUIC server doesn't agree with any of the client's proposed protocols, it returns
SSL_TLSEXT_ERR_NOACKto OpenSSL, which in normal TLS acts as "ignore ALPN". Since it's obligatory in QUIC this doesn't work - the resulting test checking this was actually receiving aninternal_erroralert (336n) on the wire when this happened. This does fail the connection, but it's clearly not correct.We now return
SSL_TLSEXT_ERR_ALERT_FATALinstead, which sends the properno_application_protocolTLS alert to the client instead, as required by the RFC.This has notably pointed out to me that we have no nice error messages in here: on the JS side, these just reference the raw error code (now
376n) with no other info. I'll bring in a general fix for error handling in another PR, watch this space.