Skip to content

Support limiting tls version - #463

Open
kajinamit wants to merge 1 commit into
celery:mainfrom
kajinamit:tls-version
Open

Support limiting tls version#463
kajinamit wants to merge 1 commit into
celery:mainfrom
kajinamit:tls-version

Conversation

@kajinamit

Copy link
Copy Markdown
Contributor

The SSLContext object provides a few properties to limit supported TLS versions. Add new options to set these.

@kajinamit
kajinamit force-pushed the tls-version branch 3 times, most recently from d703a6c to 58c33c3 Compare August 6, 2026 02:42
@auvipy
auvipy requested review from auvipy and a lite review from Copilot August 6, 2026 09:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds support for constraining negotiated TLS protocol versions by exposing SSLContext.minimum_version / maximum_version through new _wrap_socket_sni() options.

Changes:

  • Extend _wrap_socket_sni() to accept tls_minimum_version and tls_maximum_version and apply them to the created SSLContext.
  • Add unit tests covering the new TLS version limit parameters.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
amqp/transport.py Adds optional args to set SSLContext.minimum_version / maximum_version when wrapping sockets.
t/unit/test_transport.py Adds tests asserting the TLS version properties are set on the mocked SSL context.
Suppressed comments (1)

t/unit/test_transport.py:710

  • This comment mentions tls_minimum_version, but the test is exercising tls_maximum_version (and asserts context.maximum_version).
        # testing _wrap_socket_sni() with parameter tls_minimum_version

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread t/unit/test_transport.py Outdated
Comment thread amqp/transport.py Outdated
The SSLContext object provides a few properties to limit supported
TLS versions. Add new options to set these.

Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
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