GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add support in SSL module for getting/setting TLS 1.3 cipher suites · Issue #137197 · python/cpython

Add support in SSL module for getting/setting TLS 1.3 cipher suites #137197

New issue
Copy link
New issue
Copy link
Closed
Closed
Add support in SSL module for getting/setting TLS 1.3 cipher suites#137197
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-SSLtype-featureA feature request or enhancementA feature request or enhancement

Description

@ronf
ronf
opened on Jul 29, 2025
Issue body actions

Add support in SSL module for getting/setting TLS 1.3 cipher suites

Proposal:

This feature proposal is a follow-on to issue #136306, adding the ability to control TLS 1.3 cipher suites. The existing Python SSLContext class has a method to set ciphers, but it is specifically documented that it can only be used to set cipher suites from TLS 1.2 and earlier. OpenSSL has added a different function for setting TLS 1.3 ciphers, and this feature would add a wrapper around that which looks like:

    SSLContext.set_ciphersuites(ciphersuites: str) -> None:
        """Set the TLS 1.3 cipher suites for sockets created with this context."""

This function mirrors SSLContext.set_ciphers(ciphers: str) which exists today for setting TLS 1.2 and earlier cipher suites. In addition, the existing SSLSocket.cipher() method can properly return the selected cipher after the TLS handshake has completed on a connection for both TLS 1.3 and earlier TLS versions, so no changes are required to that.

This feature will also update the documentation for SSLContext.set_ciphers and the section of the docs discussing TLS 1.3 support to reflect the new capability.

Links to previous discussion of this feature:

This was previously discussed in PR #136307, in the context of continuing to improve Python's TLS 1.3 support.

Linked PRs

  • gh-137197: Add SSLContext.set_ciphersuites to set TLS 1.3 ciphers #137198

Activity

  1. ronf
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Jul 29, 2025
  2. ronf
    added 2 commits that reference this issue on Jul 29, 2025

    pythongh-137197: Add SSLContext.set_ciphersuites to set TLS 1.3 ciphers

    9ba6220

    pythongh-137197: Fix typo in documentation

    226a13a
  3. StanFromIreland
    added
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    topic-SSL
    on Jul 29, 2025
  4. ronf
    added 7 commits that reference this issue on Aug 9, 2025

    pythongh-137197: Update what's new text

    f2cda88

    pythongh-137197: Add SSLContext.set_ciphersuites to set TLS 1.3 ciphers

    5a1cc22

    pythongh-137197: Fix typo in documentation

    6783fe6

    pythongh-137197: Update what's new text

    d3375f1

    pythongh-137197: Address review comments

    48e5164

    pythongh-137197: Rework test cases

    11b760e

    pythongh-137197: Fix capitalization in docs

    eaae575
  5. ronf
    added a commit that references this issue on Aug 21, 2025

    pythongh-137197: Address review comments

    e09017f
  6. ronf
    added 2 commits that reference this issue on Aug 29, 2025

    pythongh-137197: Address review comments

    caf6675

    pythongh-137197: Address last review comment

    fe8791d
  7. picnixz
    closed this as completedon Aug 30, 2025
  8. picnixz
    added a commit that references this issue on Aug 30, 2025

    gh-137197: Add `SSLContext.set_ciphersuites` to set TLSv1.3 ciphers (#…

    bacb777
  9. lkollar
    added a commit that references this issue on Sep 9, 2025

    pythongh-137197: Add `SSLContext.set_ciphersuites` to set TLSv1.3 cip…

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-SSLtype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.