Skip to content

Stop restricting TLS listeners to the P-256 key exchange group - #20374

Open
bardiharborow wants to merge 1 commit into
element-hq:developfrom
bardiharborow:fix/tls-listener-key-exchange-groups
Open

bardiharborow wants to merge 1 commit into
element-hq:developfrom
bardiharborow:fix/tls-listener-key-exchange-groups

Conversation

@bardiharborow

@bardiharborow bardiharborow commented Oct 17, 2026 •

Copy link
Copy Markdown

Remove the set_tmp_ecdh call in ServerContextFactory.configure_context. On OpenSSL 1.1.0+ it replaces the default list of supported groups with only P-256, so TLS listeners could not negotiate X25519 or X25519MLKEM768. The call was needed on OpenSSL 1.0.x, which enabled no curves by default. Synapse now requires cryptography>=3.4.7, so OpenSSL is always 1.1.0 or later. Twisted's CertificateOptions already skips this step on 1.1.0+.

Fixes #20373

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

Remove the `set_tmp_ecdh` call in `ServerContextFactory.configure_context`.
On OpenSSL 1.1.0+ it replaced the default list of supported groups with only
P-256, so TLS listeners could not negotiate X25519 or X25519MLKEM768.

Signed-off-by: Bardi Harborow <bardi@bardiharborow.com>
@bardiharborow
bardiharborow requested a review from a team as a code owner October 17, 2026 13:12
@bardiharborow
bardiharborow requested review from devonh and removed request for a team October 17, 2026 13:12

This branch has not been deployed

No deployments
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.

TLS listeners only accept P-256 key exchange (no X25519 or X25519MLKEM768)

1 participant