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
bpo-45399: Remove hostflags from PySSLContext #28602
base: main
Are you sure you want to change the base?
bpo-45399: Remove hostflags from PySSLContext #28602
Conversation
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Is it possible to submit this PR without a bpo? (on the count of it being trivial) |
No, this is not a trivial change. Python requires a ticket for every change that has even a remote chance of affecting a single user. By definition, C and OpenSSL are not trivial, too. |
Understood, thank you. |
The
PySSLContext
struct inModules/_ssl.c
mentions that "OpenSSL has no API to get hostflags from X509_VERIFY_PARAM* struct. We have to maintain our own copy".Since OpenSSL 1.1.0i added the function
X509_VERIFY_PARAM_get_hostflags
, this statement is no longer true.Because Python 3.10 requires OpenSSL 1.1.1 (PEP 644), we no longer have to maintain a copy of the host flags.
This PR removes the
hostflags
member from thePySSLContext
struct.Note:
ssl
module docs, correctly specifying that bpo43522 was fixed in OpenSSL 1.1.1l (and not 1.1.1k as in the docs).https://bugs.python.org/issue45399