Title: Add ssl.HAS_PSK_TLS13 to detect libssl external TLS 1.3 PSK support · Issue #133623 · python/cpython · GitHub
Open Graph Title: Add ssl.HAS_PSK_TLS13 to detect libssl external TLS 1.3 PSK support · Issue #133623 · python/cpython
X Title: Add ssl.HAS_PSK_TLS13 to detect libssl external TLS 1.3 PSK support · Issue #133623 · python/cpython
Description: 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...
Open Graph Description: 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 ind...
X Description: 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_TL...
Opengraph URL: https://github.com/python/cpython/issues/133623
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add ssl.HAS_PSK_TLS13 to detect libssl external TLS 1.3 PSK support","articleBody":"### Proposal:\n\nDue to [security concerns](https://www.rfc-editor.org/rfc/rfc9258.html#section-1), neither AWS-LC [nor BoringSSL](https://issues.chromium.org/issues/369963041) support \"External PSK\" (as defined [here](https://www.rfc-editor.org/rfc/rfc9258.html#section-3)) in TLS 1.3.\n\nThis 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.\n\nThis 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.\n\n#### [One Hard Thing](https://martinfowler.com/bliki/TwoHardThings.html): Naming Concerns\n\nI'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](https://github.com/aws/aws-lc/blob/8233b4bbaf7b186639a76084f37d49b2c0bebf3c/ssl/handshake_server.cc#L1421-L1446) 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.\n\nA further complication is that AWS-LC does notionally support PSK in TLS 1.3, but [only for session resumption](https://github.com/aws/aws-lc/blob/main/ssl/tls13_enc.cc#L374) (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](https://datatracker.ietf.org/doc/html/rfc8446#section-4.2.11) is indeed used.\n\nSomething 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.\n\n### Has this already been discussed elsewhere?\n\nThis is a minor feature, which does not need previous discussion elsewhere\n\n### Links to previous discussion of this feature:\n\nRelated changes to increase libcrypto/libssl compatibility (specifically with AWS-LC) have been discussed with the community [here](https://discuss.python.org/t/support-building-ssl-and-hashlib-modules-against-aws-lc/44505/2).\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-133624\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/WillChilds-Klein","@type":"Person","name":"WillChilds-Klein"},"datePublished":"2025-05-07T22:22:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/133623/cpython/issues/133623"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3554173f-9b5e-3ed6-6da9-175a3f2b57a5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 85F8:3FFE0B:D03B0F:129D60B:6A588F4D |
| html-safe-nonce | cd6313a430010e343a4eb5f7829deeab85c653f8013321caa43a01372e3ade3a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUY4OjNGRkUwQjpEMDNCMEY6MTI5RDYwQjo2QTU4OEY0RCIsInZpc2l0b3JfaWQiOiIyODU4MzQwMjQyMzgxMzc3MzU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 282f1835d66380c9d1b516071fd76833e32e098ccf40244e1f96dc8bffa53d0b |
| hovercard-subject-tag | issue:3047294648 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/133623/issue_layout |
| twitter:image | https://opengraph.githubassets.com/308524c9a228ebbd0568a0ac6900a643bc30d498585322ba9b2077f045adfb6c/python/cpython/issues/133623 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/308524c9a228ebbd0568a0ac6900a643bc30d498585322ba9b2077f045adfb6c/python/cpython/issues/133623 |
| og:image:alt | 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 ind... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | WillChilds-Klein |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width