Title: Possibly unintentional change in ssl (cert_reqs=CERT_NONE does not allow check_hostname=True) since 3.10 · Issue #114905 · python/cpython · GitHub
Open Graph Title: Possibly unintentional change in ssl (cert_reqs=CERT_NONE does not allow check_hostname=True) since 3.10 · Issue #114905 · python/cpython
X Title: Possibly unintentional change in ssl (cert_reqs=CERT_NONE does not allow check_hostname=True) since 3.10 · Issue #114905 · python/cpython
Description: There is a possibly unintentional effect of #25455. In Python 3.9: >>> import ssl >>> ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1_2, cert_reqs=ssl.CERT_NONE, check_hostname=True)
Open Graph Description: There is a possibly unintentional effect of #25455. In Python 3.9: >>> import ssl >>> ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1_2, cert_reqs=ssl.CERT_NONE, check_hostname=True) X Description: There is a possibly unintentional effect of #25455. In Python 3.9: >>> import ssl >>> ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1_2, cert_reqs=ssl.CERT_NONE, check_hostname=True...
Opengraph URL: https://github.com/python/cpython/issues/114905
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Possibly unintentional change in ssl (cert_reqs=CERT_NONE does not allow check_hostname=True) since 3.10","articleBody":"There is a possibly unintentional effect of #25455.\r\n\r\nIn Python 3.9:\r\n```pycon\r\n>>> import ssl\r\n>>> ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1_2, cert_reqs=ssl.CERT_NONE, check_hostname=True)\r\n\u003cssl.SSLContext object at 0x7f93d68253c0>\r\n```\r\n\r\nIn Python 3.10:\r\n```pycon\r\n>>> import ssl\r\n>>> ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1_2, cert_reqs=ssl.CERT_NONE, check_hostname=True)\r\n/home/serhiy/py/cpython3.10/Lib/ssl.py:806: DeprecationWarning: ssl.PROTOCOL_TLSv1_2 is deprecated\r\n context = SSLContext(protocol)\r\nTraceback (most recent call last):\r\n File \"\u003cstdin>\", line 1, in \u003cmodule>\r\n File \"/home/serhiy/py/cpython3.10/Lib/ssl.py\", line 809, in _create_unverified_context\r\n context.verify_mode = cert_reqs\r\n File \"/home/serhiy/py/cpython3.10/Lib/ssl.py\", line 738, in verify_mode\r\n super(SSLContext, SSLContext).verify_mode.__set__(self, value)\r\nValueError: Cannot set verify_mode to CERT_NONE when check_hostname is enabled.\r\n```\r\n\r\nThis code not only emits a DeprecationWarning (it was expected), but also raises a ValueError.\r\n\r\nThis change left a confusing remnant in the code (see #103625) which can be safely deleted if this change was intentional. But this corner case is not covered by tests, this effect was not documented, so it is not known whether it was intentional change or error.\r\n\r\ncc @tiran\r\n\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-155509\n* gh-155670\n* gh-155671\n* gh-155672\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/serhiy-storchaka","@type":"Person","name":"serhiy-storchaka"},"datePublished":"2024-02-02T12:00:43Z","url":"https://github.com/python/cpython/issues/114905"}
react-profiling 0 react-import-map react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 route-pattern /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) route-controller voltron_issues_fragments route-action issue_layout fetch-nonce v2:5c75d85a-cebc-85c3-5790-861b946a15ff current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id A8CA:1F2F:1AA5B79:236342F:6B0209CF html-safe-nonce 18dbba5ef7f1e4f93c37df1d05dd9ea873d7cb44ec565da444b89511911065fe visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOENBOjFGMkY6MUFBNUI3OToyMzYzNDJGOjZCMDIwOUNGIiwidmlzaXRvcl9pZCI6IjExNDA1NzM3NTg4OTM5ODQyMDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== visitor-hmac 155502e705e77b9330fb0b5b165084623ef5b14229ac4b01f99d0584b70555ce hovercard-subject-tag issue:2114776457 github-keyboard-shortcuts repository,issues,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/_view_fragments/issues/show/python/cpython/114905/issue_layout twitter:image https://opengraph.githubassets.com/92e715fbd3946aad3fe2ddc1e94171acb72a3f879b3e40321a27e346a83cb802/python/cpython/issues/114905 twitter:card summary_large_image og:image https://opengraph.githubassets.com/92e715fbd3946aad3fe2ddc1e94171acb72a3f879b3e40321a27e346a83cb802/python/cpython/issues/114905 og:image:alt There is a possibly unintentional effect of #25455. In Python 3.9: >>> import ssl >>> ssl._create_stdlib_context(ssl.PROTOCOL_TLSv1_2, cert_reqs=ssl.CERT_NONE, check_hostname=True) og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username serhiy-storchaka hostname github.com expected-hostname github.com None 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 turbo-cache-control no-preview 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 false browser-stats-url https://api.github.com/_private/browser/stats browser-errors-url https://api.github.com/_private/browser/errors release 423dbb54c5e7bfecc838eb387c1435eb3d0e760d ui-target canary-2 theme-color #1e2327 color-scheme light dark react-app-name issues
URLs of crawlers that visited me.