-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-43522: Fix SSLContext.hostname_checks_common_name (GH-24899) #24899
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
Conversation
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.
Thank you, both the reproducer and the urllib3 test suite run fine with this change!
|
The fix has landed in OpenSSL 3.0.0 and is flagged for backport to 1.1.1. |
dd0f554 to
5dcab4b
Compare
5dcab4b to
c25e687
Compare
|
Thanks! Should we mention in the docs that the flag had no effect until now? |
Something like this? I'll adjust the versionchanged to 3.8.9 and 3.9.3 in backports. |
|
Yes, that would be perfect. That way we'll know for what Python and OpenSSL combinations this flag will be safe to use. There's one thing I don't understand: is it enough to have either the CPython and OpenSSL fixes, or do we need both? |
|
The workaround in this PR is only necessary for OpenSSL 1.1.1k and older. 1.1.1l and 3.0.0 are going to copy the flag correctly without the workaround.
|
c25e687 to
8c652a6
Compare
Fix problem with ssl.SSLContext.hostname_checks_common_name. OpenSSL does not copy hostflags from *struct SSL_CTX* to *struct SSL*. Signed-off-by: Christian Heimes <[email protected]>
8c652a6 to
3cba59d
Compare
|
Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
|
Sorry, @tiran, I could not cleanly backport this to |
|
Sorry @tiran, I had trouble checking out the |
|
GH-25451 is a backport of this pull request to the 3.9 branch. |
…-24899) Fix problem with ssl.SSLContext.hostname_checks_common_name. OpenSSL does not copy hostflags from *struct SSL_CTX* to *struct SSL*. Signed-off-by: Christian Heimes <[email protected]>. (cherry picked from commit b467d9a) Co-authored-by: Christian Heimes <[email protected]>
…thonGH-24899) Fix problem with ssl.SSLContext.hostname_checks_common_name. OpenSSL does not copy hostflags from *struct SSL_CTX* to *struct SSL*. Signed-off-by: Christian Heimes <[email protected]>. (cherry picked from commit b467d9a) Co-authored-by: Christian Heimes <[email protected]> (cherry picked from commit 330b49e) Co-authored-by: Christian Heimes <[email protected]>
|
GH-25452 is a backport of this pull request to the 3.8 branch. |
GH-25451) Fix problem with ssl.SSLContext.hostname_checks_common_name. OpenSSL does not copy hostflags from *struct SSL_CTX* to *struct SSL*. Signed-off-by: Christian Heimes <[email protected]>. (cherry picked from commit b467d9a) Co-authored-by: Christian Heimes <[email protected]>
Fix problem with ssl.SSLContext.hostname_checks_common_name. OpenSSL does not
copy hostflags from struct SSL_CTX to struct SSL.
Signed-off-by: Christian Heimes [email protected]
https://bugs.python.org/issue43522