Skip to content

Refresh default TLS context on secret update#13342

Open
bneradt wants to merge 1 commit into
apache:masterfrom
bneradt:fix-cert-secret-default-refresh
Open

Refresh default TLS context on secret update#13342
bneradt wants to merge 1 commit into
apache:masterfrom
bneradt:fix-cert-secret-default-refresh

Conversation

@bneradt

@bneradt bneradt commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Default server certificate secret updates could rebuild the TLS
contexts for CN/SAN lookups while leaving the default/no-SNI context
pointing at the old SSL_CTX. Operators could update cert material on
disk and through the secret API, but new handshakes without a more
specific match could still serve the stale certificate.

This updates runtime context refresh to cover address/default lookup
entries owned by the same ssl_multicert policy and retains the
default context while callers create new TLS sessions. This also adds
an AuTest that updates a plugin-loaded default certificate and
verifies the next no-SNI handshake sees the new certificate.

Fixes: #9562

Default server certificate secret updates could rebuild the TLS
contexts for CN/SAN lookups while leaving the default/no-SNI context
pointing at the old SSL_CTX. Operators could update cert material on
disk and through the secret API, but new handshakes without a more
specific match could still serve the stale certificate.

This updates runtime context refresh to cover address/default lookup
entries owned by the same ssl_multicert policy and retains the
default context while callers create new TLS sessions. This also adds
an AuTest that updates a plugin-loaded default certificate and
verifies the next no-SNI handshake sees the new certificate.

Fixes: apache#9562
@bneradt bneradt added this to the 11.0.0 milestone Jun 26, 2026
Copilot AI review requested due to automatic review settings June 26, 2026 18:43
@bneradt bneradt self-assigned this Jun 26, 2026

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

In what cases are updates by TSSslSecretSet() actually used?

2 participants