Skip to content

Conversation

@Sp1l
Copy link
Contributor

@Sp1l Sp1l commented Jan 26, 2018

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

tiran and others added 2 commits January 21, 2018 00:12
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.
@the-knights-who-say-ni
Copy link

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
Copy link
Member

tiran commented Jan 26, 2018

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
Copy link
Contributor Author

Sp1l commented Jan 26, 2018

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

@Sp1l
Copy link
Contributor Author

Sp1l commented Jan 26, 2018

@tiran Merged your changes into this PR.

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

@tiran
Copy link
Member

tiran commented Jan 26, 2018

Awesome! Thanks! 👍

  • The-knights-who-say-ni don't see your CLI yet. It may take a day or two until it is processed by a human being.
  • You have to regenerate the argument clinic, please run make clinic and push the modified header file.
  • I'm currently travelling. Your fix may not land in 3.7.0-beta 1.

Copy link
Member

@tiran tiran left a 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
Copy link
Member

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
Copy link

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
Copy link
Member

tiran commented Feb 24, 2018

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

@tiran
Copy link
Member

tiran commented Feb 24, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants