Skip to content

Don't share cached SSL_CTX between accept/connect - #68

Merged
prefiks merged 1 commit into
processone:masterfrom
weiss:fix/certs-map-key
Oct 19, 2026
Merged

prefiks merged 1 commit into
processone:masterfrom
weiss:fix/certs-map-key

Conversation

@weiss

@weiss weiss commented Oct 18, 2026

Copy link
Copy Markdown
Member

The certs_map cache key didn't include the command, so a context created for an outgoing (s2s) connection could be reused for incoming (e.g., c2s) connections with the same certificate and options. As it lacks the SNI callback, the default certificate was then offered regardless of the requested server name, until the cache was cleared.

Include the command in the cache key to fix this.

The certs_map cache key didn't include the command, so a context
created for an outgoing (s2s) connection could be reused for incoming
(e.g., c2s) connections with the same certificate and options.  As it
lacks the SNI callback, the default certificate was then offered
regardless of the requested server name, until the cache was cleared.

Include the command in the cache key to fix this.

Fixes processone/ejabberd#4102.
@prefiks
prefiks merged commit dfa7d0d into processone:master Oct 19, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants