ssl: remove the dead SSL_HOOK_OP_TERMINATE op - #13407
Merged
Merged
Conversation
No code has ever assigned hookOpRequested this value: the introducing commit (TS-3006, 2014) only wrote it to an example plugin's own struct, and the public TSSslVConnOp API that could have set it was removed in 2016 (TS-4658). A hook rejects a handshake via TSVConnReenableEx(TS_EVENT_ERROR) instead, so drop the enumerator and its unreachable arm in sslServerHandShakeEvent().
Contributor
There was a problem hiding this comment.
Pull request overview
Removes a dead/unreachable TLS handshake hook operation (SSL_HOOK_OP_TERMINATE) from the internal SslVConnOp enum and eliminates the corresponding unreachable branch in the server handshake state machine, simplifying the TLS handshake control flow without changing behavior.
Changes:
- Drop
SslVConnOp::SSL_HOOK_OP_TERMINATEfrom the internal enum. - Remove the unreachable
hookOpRequested == SSL_HOOK_OP_TERMINATEarm inSSLNetVConnection::sslServerHandShakeEvent().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/iocore/net/SSLNetVConnection.cc | Removes an unreachable handshake branch tied to the deleted op. |
| src/iocore/net/P_SSLNetVConnection.h | Removes the dead SslVConnOp enumerator so only supported ops remain. |
JosiahWI
approved these changes
Jul 20, 2026
bneradt
approved these changes
Jul 20, 2026
cmcfarlen
pushed a commit
to cmcfarlen/trafficserver
that referenced
this pull request
Jul 29, 2026
No code has ever assigned hookOpRequested this value: the introducing commit (TS-3006, 2014) only wrote it to an example plugin's own struct, and the public TSSslVConnOp API that could have set it was removed in 2016 (TS-4658). A hook rejects a handshake via TSVConnReenableEx(TS_EVENT_ERROR) instead, so drop the enumerator and its unreachable arm in sslServerHandShakeEvent(). (cherry picked from commit c64d786)
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.
SslVConnOp::SSL_HOOK_OP_TERMINATEhas never been assigned tohookOpRequested: the commit that introduced it (TS-3006, 2014) only wrote the corresponding public value into the example plugins' own config structs, and the publicTSSslVConnOptype that exposed it was removed in 2016 (TS-4658).No code in the tree assigns TERMINATE today:
hookOpRequestedis only ever reset toSSL_HOOK_OP_DEFAULTor set toSSL_HOOK_OP_TUNNEL(by thessl_multicert.configtunneloption andTSVConnTunnel()). A hook that wants to end a handshake usesTSVConnReenableExwithTS_EVENT_ERRORinstead.Drop the enumerator and its unreachable arm in
sslServerHandShakeEvent(). No functional change.