bpo-30622: Change NPN detection by Sp1l · Pull Request #5343 · python/cpython (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation10 Commits5 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

Sp1l

@tiran

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.

@Sp1l

This aligns the way NPN support is detected in the code. It now works the same way that ALPN support is detected and used.

@the-knights-who-say-ni

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!

@tiran

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?

@Sp1l

@tiran No problemo. Let me check #5253
You're OK with the general direction on the NPN feature detection?

@Sp1l

@Sp1l

@Sp1l

@tiran Merged your changes into this PR.

CLA has been signed based on my bugs.python.org id 'spil'

@tiran

Awesome! Thanks! 👍

tiran

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.

* https://github.com/libressl-portable/portable/issues/368
*/
#ifdef OPENSSL_VERSION_1_1
# ifdef OPENSSL_NO_NEXTPROTONEG

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

@bedevere-bot

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 made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@tiran tiran mentioned this pull request

Feb 24, 2018

@tiran

@tiran

I have resolved the merge conflict through GH ui. Tests are still failing because the clinic file is outdated.

@tiran

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.