-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-30622: Change NPN detection #5343
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
The ssl module now contains a workaround for missing NPN support in LibreSSL 2.6.1. Upstream has removed NPN without setting OPENSSL_NO_NEXTPROTONEG.
This aligns the way NPN support is detected in the code. It now works the same way that ALPN support is detected and used.
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
|
Thanks! I have another NPN related fix in #5253. Are you ok if I merge your improvements with mine and give you credit for your work? |
|
@tiran Merged your changes into this PR. CLA has been signed based on my bugs.python.org id 'spil' |
|
Awesome! Thanks! 👍
|
tiran
left a comment
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 rebase your patch and simplify the check as explained.
Modules/_ssl.c
Outdated
| * https://github.com/libressl-portable/portable/issues/368 | ||
| */ | ||
| #ifdef OPENSSL_VERSION_1_1 | ||
| # ifdef OPENSSL_NO_NEXTPROTONEG |
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.
I think it is safe to simplify the check even further. NPN is available if TLSEXT_TYPE_next_proto_neg and OPENSSL_NO_NEXTPROTONEG is not defined.
#ifdef OPENSSL_NO_NEXTPROTONEG
# define HAVE_NPN 0
#elif defined(TLSEXT_TYPE_next_proto_neg)
# define HAVE_NPN 1
#else
# define HAVE_NPN 0
# endif
|
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 |
|
I have resolved the merge conflict through GH ui. Tests are still failing because the clinic file is outdated. |
|
Somehow I messed up your PR with Github's UI. Since 3.7.0b2 is immanent, I created PR #5859 and gave you credit as co-author. |
This aligns the way NPN support is detected in the code. It now works the same way that ALPN support is detected and used.
https://bugs.python.org/issue30622