tls_renegotiation autest: gate the detection-line check to OpenSSL#13371
Merged
Conversation
BoringSSL rejects a peer-initiated renegotiation inside the library before ATS's SSL info callback runs -- SSL_get_state() there only ever returns SSL_ST_INIT or SSL_ST_OK, never SSL_ST_RENEGOTIATE -- so the "trying to renegotiate from the client" line is never logged and the ContainsExpression fails on BoringSSL (Apache CI stays green because it runs OpenSSL). The crash-safety check still runs on every SSL library; only the detection-line assertion is now OpenSSL-only.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a portability issue in the TLS renegotiation gold test by making the “renegotiation detected” log assertion OpenSSL-only, while preserving the cross-library “no crash” safety check so the test remains meaningful on BoringSSL.
Changes:
- Gate the
traffic.outdetection-lineContainsExpression("trying to renegotiate from the client")behindCondition.IsOpenSSL(). - Keep the crash-safety
ExcludesExpression("received signal|failed assertion")unconditional for continued BoringSSL coverage. - Expand the in-test comment to document why the detection log line is not expected on BoringSSL.
maskit
approved these changes
Jul 8, 2026
Contributor
|
Cherry-picked to 10.2.x |
cmcfarlen
pushed a commit
that referenced
this pull request
Jul 13, 2026
…13371) BoringSSL rejects a peer-initiated renegotiation inside the library before ATS's SSL info callback runs -- SSL_get_state() there only ever returns SSL_ST_INIT or SSL_ST_OK, never SSL_ST_RENEGOTIATE -- so the "trying to renegotiate from the client" line is never logged and the ContainsExpression fails on BoringSSL (Apache CI stays green because it runs OpenSSL). The crash-safety check still runs on every SSL library; only the detection-line assertion is now OpenSSL-only. (cherry picked from commit 7c4fc5b)
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.
Problem
The
tls_renegotiation.test.pygold test added in #13306 fails on BoringSSL. It passes on OpenSSL, so the ASF CI is green and the gap went unnoticed.The test's
ContainsExpression("trying to renegotiate from the client")asserts on a debug line emitted byssl_callback_info()inSSLUtils.cc, which lives behind thestate == SSL_ST_RENEGOTIATEbranch. On BoringSSL that branch is compiled (SSL_ST_RENEGOTIATEis#defined) but never taken: per BoringSSL'sssl.h,SSL_get_state()/SSL_state()"only ever returnSSL_ST_INITorSSL_ST_OK", neverSSL_ST_RENEGOTIATE. BoringSSL also rejects a peer-initiated renegotiation inside the library before the callback runs, so ATS never logs the line — the connection is refused safely, but the detection assertion has nothing to match.Fix
Gate only the detection-line assertion behind
Condition.IsOpenSSL(). The crash-safetyExcludesExpressionstays unconditional, so BoringSSL keeps that coverage; only the detection-line check is now OpenSSL-only. This mirrors theCondition.IsOpenSSL()pattern already used intls_async_handshake.test.py.tls_renegotiation_allowed.test.pyneeds no change — it only asserts on client-side output.Follow-up (not in this PR)
On BoringSSL the
SSL_ST_RENEGOTIATEbranch inssl_callback_info()is effectively dead, so ATS's own renegotiation logging/abort never fires andallow_client_renegotiation=1is a no-op there. Not a security issue — BoringSSL enforces the refusal regardless — but the branch is misleading and could be cleaned up or wired to a mechanism that actually fires.