tls,quic: commonize TLS cert handling between tls, dtls & quic#64711
Open
pimterry wants to merge 2 commits into
Open
tls,quic: commonize TLS cert handling between tls, dtls & quic#64711pimterry wants to merge 2 commits into
pimterry wants to merge 2 commits into
Conversation
Collaborator
|
Review requested:
|
Signed-off-by: Tim Perry <pimterry@gmail.com>
pimterry
force-pushed
the
shared-tls-certs-impl
branch
from
July 24, 2026 12:44
87f1206 to
b9d8979
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #64711 +/- ##
==========================================
- Coverage 90.14% 90.14% -0.01%
==========================================
Files 741 744 +3
Lines 242246 242334 +88
Branches 45621 45628 +7
==========================================
+ Hits 218381 218460 +79
+ Misses 15370 15365 -5
- Partials 8495 8509 +14
🚀 New features to boost your workflow:
|
Renamed to _certificates - this will make the split clearer with the other incoming future helper files.
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.
We are currently maintaining 3 different layers over OpenSSL's TLS API (
node:tls/quic/dtls), which all reimplement the same things in subtly different ways, and will require any fixes to be applied 3x.This is a first step towards commonizing them to share logic & options directly. Medium term, I want to end up with one API shape for TLS configuration (very close to current
node:tls, maybe some additions from QUIC/DTLS) with a 95% shared implementation (some small exceptions for real protocol configuration divergences - but the exposed set of these is small). Consider this a first step and demo to discuss if people are on board. CC @nodejs/crypto.This PR focuses on cert management:
node:tlsCA & cert store logic into separate helpersnode:quicandnode:dtls, dropping the custom equivalentsThis notably fixes a few bugs en route:
node:quicranSSL_CTX_set_default_verify_pathsevery time it initialized a context, doing IO every time, then throwing the configuration away with the subsequentSSL_CTX_set_cert_storecall.node:dtlsignored the configured Node CA settings.node:dtlsdidn't list trusted client CAs in the server handshake response for mtls.These are all fixed by reusing the existing logic. The helpers are direct moves, so this shouldn't change
node:tlsbehaviour at all - it just changes the other modules to use them. Behaviour of DTLS & QUIC will change in small ways, but only to align withnode:tls.