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 ssl.HAS_PSK_TLS13 to detect libssl external TLS 1.3 PSK support · Issue #133623 · python/cpython

Add ssl.HAS_PSK_TLS13 to detect libssl external TLS 1.3 PSK support #133623

New issue
Copy link
New issue
Copy link
Closed
Closed
Add ssl.HAS_PSK_TLS13 to detect libssl external TLS 1.3 PSK support#133623
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

@WillChilds-Klein
WillChilds-Klein
opened on May 7, 2025
Issue body actions

Proposal:

Due to security concerns, neither AWS-LC nor BoringSSL support "External PSK" (as defined here) in TLS 1.3.

This issue proposes the addition of a boolean property ssl.HAS_PSK_TLS13 to indicate whether the crypto library CPython is built against supports External PSK, allowing python's test suite and consuming modules to branch accordingly.

This feature has precedent in the ssl.HAS_PSK and ssl.HAS_PHA flags indicating support (or lack thereof) for other TLS features that are not universally implemented across TLS libraries.

One Hard Thing: Naming Concerns

I'm not sure that HAS_PSK_TLS13 is the best name. While AWS-LC doesn't support "External PSKs" in TLS 1.3 (i.e. "PSK" is only used for session resumption), it does for earlier TLS versions. However, the "external" terminology established in RFC 9258 pertains specifically to TLS 1.3. So do we include EXTERNAL instead of TLS13 in the ssl module property name? My thought is "no" because it's somewhat imprecise.

A further complication is that AWS-LC does notionally support PSK in TLS 1.3, but only for session resumption (this is fine security-wise, as sessions can't span protocol versions). This makes the current suggestion of HAS_PSK_TLS13 somewhat disingenuous, as the PreSharedKeyExtension is indeed used.

Something like ssl.HAS_TLS13_EXTERNAL_PSK "feels" like an abomination, but is probably the most accurate. Anyway, I don't see a clear choice and am very open to suggestions.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

Related changes to increase libcrypto/libssl compatibility (specifically with AWS-LC) have been discussed with the community here.

Linked PRs

  • gh-133623: Add ssl.HAS_PSK_TLS13 to detect external TLS 1.3 PSK support #133624

Activity

  1. WillChilds-Klein
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on May 7, 2025
  2. picnixz
    added
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    topic-SSL
    on May 7, 2025
  3. picnixz
    added a commit that references this issue on May 9, 2025

    gh-133623: Add `ssl.HAS_PSK_TLS13` to detect external TLS 1.3 PSK sup…

    6801bd3
  4. picnixz
    closed this as completedon May 9, 2025
  5. picnixz commented on May 9, 2025

    @picnixz
    picnixz
    on May 9, 2025
    Member
    More actions

    Alternative naming would have been "HAS_EXTERNAL_PSK_TLS13" but it's too long IMO and I doubt we will have an INTERNAL_PSK_TLS13 at some point. Anyway, if needs arise, we can refix it in a follow-up PR. We have other bunch of PSK_TLS13 terminology, but I think the "main" component is fine.

  6. Pranjal095
    added a commit that references this issue on Jul 12, 2025

    pythongh-133623: Add `ssl.HAS_PSK_TLS13` to detect external TLS 1.3 P…

    e4b6329
  7. taegyunkim
    added a commit that references this issue on Aug 4, 2025

    pythongh-133623: Add `ssl.HAS_PSK_TLS13` to detect external TLS 1.3 P…

    6930418
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.