-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
gh-136306: Add support for SSL groups #136307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This is an initial implementation of the feature proposed in issue python#136306.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A first round of comments
>>> ctx.get_groups() | ||
['secp256r1', 'secp384r1', 'secp521r1', 'x25519', 'x448', 'brainpoolP256r1tls13', 'brainpoolP384r1tls13', 'brainpoolP512r1tls13', 'ffdhe2048', 'ffdhe3072', 'ffdhe4096', 'ffdhe6144', 'ffdhe8192', 'MLKEM512', 'MLKEM768', 'MLKEM1024', 'SecP256r1MLKEM768', 'X25519MLKEM768', 'SecP384r1MLKEM1024' | ||
|
||
.. versionadded:: 3.15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. versionadded:: 3.15 | |
.. versionadded:: next |
values. | ||
|
||
Example:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
values. | |
Example:: | |
values. For example:: |
And remove the indentation in the example (I don't think it's necessary)
<https://docs.openssl.org/master/man3/SSL_CTX_set1_groups_list/>`_. | ||
|
||
.. note:: | ||
when connected, the :meth:`SSLSocket.group` method of SSL sockets will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when connected, the :meth:`SSLSocket.group` method of SSL sockets will | |
When connected, the :meth:`SSLSocket.group` method of SSL sockets will |
@@ -1789,6 +1817,10 @@ to speed up repeated connections from the same clients. | |||
|
|||
.. versionadded:: 3.3 | |||
|
|||
.. deprecated:: 3.15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be done in a separate PR as it would be better to raise a warning. Leave it supported for now.
@@ -0,0 +1 @@ | |||
:mod:`ssl` can now get and set groups used for key agreement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a what's new entry as well.
if (self->ssl == NULL) | ||
Py_RETURN_NONE; | ||
group_name = SSL_get0_group_name(self->ssl); | ||
if (group_name == NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow PEP-7 for new code (add braces).
This is an initial implementation of the feature proposed in issue #136306.
📚 Documentation preview 📚: https://cpython-previews--136307.org.readthedocs.build/