]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-136306: Add support for getting and setting SSL groups (#136307)
authorRon Frederick <ronf@timeheart.net>
Mon, 28 Jul 2025 17:33:31 +0000 (10:33 -0700)
committerGitHub <noreply@github.com>
Mon, 28 Jul 2025 17:33:31 +0000 (19:33 +0200)
commit377b78761814e7d848361e642d376881739d5a29
tree40c764a92a6cad999151f209b869576244739a5b
parent59e2330cf391a9dc324690f8579acd179e66d19d
gh-136306: Add support for getting and setting SSL groups (#136307)

Add support for getting and setting groups used for key agreement.

* `ssl.SSLSocket.group()` returns the name of the group used
  for the key agreement of the current session establishment.
  This feature requires Python to be built with OpenSSL 3.2 or later.

* `ssl.SSLContext.get_groups()` returns the list of names of groups
  that are compatible with the TLS version of the current context.
  This feature requires Python to be built with OpenSSL 3.5 or later.

* `ssl.SSLContext.set_groups()` sets the groups allowed for key agreement
  for sockets created with this context. This feature is always supported.
Doc/library/ssl.rst
Doc/whatsnew/3.15.rst
Include/internal/pycore_global_objects_fini_generated.h
Include/internal/pycore_global_strings.h
Include/internal/pycore_runtime_init_generated.h
Include/internal/pycore_unicodeobject_generated.h
Lib/ssl.py
Lib/test/test_ssl.py
Misc/NEWS.d/next/Library/2025-07-04-23-45-00.gh-issue-136306.O1YLIU.rst [new file with mode: 0644]
Modules/_ssl.c
Modules/clinic/_ssl.c.h