Skip to content

ssl: remove the dead SSL_HOOK_OP_TERMINATE op - #13407

Merged
moonchen merged 1 commit into
apache:masterfrom
moonchen:remove-ssl-hook-op-terminate
Jul 20, 2026
Merged

moonchen merged 1 commit into
apache:masterfrom
moonchen:remove-ssl-hook-op-terminate

Conversation

@moonchen

Copy link
Copy Markdown
Contributor

SslVConnOp::SSL_HOOK_OP_TERMINATE has never been assigned to hookOpRequested: the commit that introduced it (TS-3006, 2014) only wrote the corresponding public value into the example plugins' own config structs, and the public TSSslVConnOp type that exposed it was removed in 2016 (TS-4658).

No code in the tree assigns TERMINATE today: hookOpRequested is only ever reset to SSL_HOOK_OP_DEFAULT or set to SSL_HOOK_OP_TUNNEL (by the ssl_multicert.config tunnel option and TSVConnTunnel()). A hook that wants to end a handshake uses TSVConnReenableEx with TS_EVENT_ERROR instead.

Drop the enumerator and its unreachable arm in sslServerHandShakeEvent(). No functional change.

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().
Copilot AI review requested due to automatic review settings July 19, 2026 21:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_TERMINATE from the internal enum.
  • Remove the unreachable hookOpRequested == SSL_HOOK_OP_TERMINATE arm in SSLNetVConnection::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.

@moonchen moonchen self-assigned this Jul 19, 2026
@moonchen moonchen added this to the 11.0.0 milestone Jul 19, 2026
@moonchen
moonchen merged commit c64d786 into apache:master Jul 20, 2026
15 checks passed
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)
@cmcfarlen cmcfarlen moved this to Picked v10.2.0 in ATS v10.2.x Jul 29, 2026
@cmcfarlen cmcfarlen modified the milestones: 11.0.0, 10.2.0 Jul 29, 2026
@github-project-automation github-project-automation Bot moved this from Picked v10.2.0 to For v10.2.0 in ATS v10.2.x Jul 29, 2026
@cmcfarlen cmcfarlen moved this from For v10.2.0 to Picked v10.2.0 in ATS v10.2.x Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Picked v10.2.0

Development

Successfully merging this pull request may close these issues.

5 participants