Title: [2.7] bpo-30622: Change NPN detection: (GH-2079) by tiran · Pull Request #3316 · python/cpython · GitHub
Open Graph Title: [2.7] bpo-30622: Change NPN detection: (GH-2079) by tiran · Pull Request #3316 · python/cpython
X Title: [2.7] bpo-30622: Change NPN detection: (GH-2079) by tiran · Pull Request #3316 · python/cpython
Description: Change NPN detection: Version breakdown, support disabled (pre-patch/post-patch): pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and OPENSSL_NO_NEXTPROTONEG will be defined -> True/False Version breakdown support enabled (pre-patch/post-patch): pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED will be defined and OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True 1.1.0+: OPENSSL_NPN_NEGOTIATED will be defined and OPENSSL_NO_NEXTPROTONEG will not be defined -> True/True Refine NPN guard: If NPN is disabled, but ALPN is available we need our callback Make clinic's ssl behave the same way This created a working ssl module for me, with NPN disabled and ALPN enabled for OpenSSL 1.1.0f. Concerns to address: The initial commit for NPN support into OpenSSL [1], had the OPENSSL_NPN_* variables defined inside the OPENSSL_NO_NEXTPROTONEG guard. The question is if that ever made it into a release. This would need an ugly hack, something like: GH-if defined(OPENSSL_NO_NEXTPROTONEG) && \ !defined(OPENSSL_NPN_NEGOTIATED) GH- define OPENSSL_NPN_UNSUPPORTED 0 GH- define OPENSSL_NPN_NEGOTIATED 1 GH- define OPENSSL_NPN_NO_OVERLAP 2 GH-endif [1] openssl/openssl@68b33cc5c7. (cherry picked from commit b2d096b) https://bugs.python.org/issue30622
Open Graph Description: Change NPN detection: Version breakdown, support disabled (pre-patch/post-patch): pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED w...
X Description: Change NPN detection: Version breakdown, support disabled (pre-patch/post-patch): pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIAT...
Opengraph URL: https://github.com/python/cpython/pull/3316
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c5724ad0-c5b0-55c4-bfab-d242632afd1d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A0AC:2171D7:D581F9:12A016A:696A392D |
| html-safe-nonce | 0f145536261ea2e1c92bf376ae2fa68f04d94fb3b6a88833050929ede05afbf3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMEFDOjIxNzFENzpENTgxRjk6MTJBMDE2QTo2OTZBMzkyRCIsInZpc2l0b3JfaWQiOiI2NTQyNzI1Mjc2NjQ1MzQxNDg1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2895e56b0cae37ee20cec5ebefd671a58ca257f9e2a2fcf2c49cff6fc4b77d0f |
| hovercard-subject-tag | pull_request:139212367 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/3316/files |
| twitter:image | https://avatars.githubusercontent.com/u/444071?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/444071?s=400&v=4 |
| og:image:alt | Change NPN detection: Version breakdown, support disabled (pre-patch/post-patch): pre-1.0.1: OPENSSL_NPN_NEGOTIATED will not be defined -> False/False 1.0.1 and 1.0.2: OPENSSL_NPN_NEGOTIATED w... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7a9163cefd1ea4bd06f8eb7c082f43e4e53f626f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width