tls: add unsupported renegotiation error#63161
Conversation
Map BoringSSL's native renegotiation failure to ERR_TLS_RENEGOTIATION_UNSUPPORTED when TLSSocket#renegotiate() is called. This avoids exposing an implementation-specific OpenSSL error when the TLS backend does not support caller-initiated renegotiation. Signed-off-by: Filip Skokan <[email protected]>
Signed-off-by: Filip Skokan <[email protected]>
|
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #63161 +/- ##
==========================================
- Coverage 90.04% 90.02% -0.02%
==========================================
Files 713 713
Lines 224484 224505 +21
Branches 42430 42436 +6
==========================================
- Hits 202134 202110 -24
- Misses 14156 14224 +68
+ Partials 8194 8171 -23
🚀 New features to boost your workflow:
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Is it intentional that all these test additions are in this PR?
There was a problem hiding this comment.
yes, the main point is the boringssl test behaviour adjustments, but in order to do them i wanted to hide the ugly internal error
| } else { | ||
| assert.throws(() => tls.createServer(options, common.mustNotCall()), | ||
| /no[_ ]cipher[_ ]match/i); | ||
| } |
There was a problem hiding this comment.
This seems like it's the point of the test – is there a way to align the behavior instead of adjusting the test?
There was a problem hiding this comment.
There isn't a value i can use starting with TLS_ (which is what this case is about) that would make BoringSSL reject.
tls: add unsupported renegotiation errorMap BoringSSL's native renegotiation failure to
ERR_TLS_RENEGOTIATION_UNSUPPORTEDwhenTLSSocket#renegotiate()is called. This avoids exposing a rather uglyERR_SSL_FUNCTION_SHOULD_NOT_HAVE_BEEN_CALLED.test: update tls/crypto behaviour expectations when using BoringSSLI've been testing the BoringSSL coverage in #63125, as I slowly drain that stack we'll be able to add BoringSSL to the
test-shared.ymlworkflow such that embedders do not have to disable tests or float patches.