Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: urllib3/urllib3
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.25.4
Choose a base ref
...
head repository: urllib3/urllib3
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.25.5
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Sep 20, 2019

  1. Release 1.25.5 (#1685)

    sethmlarson authored Sep 20, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    edc3ddb View commit details
Showing with 16 additions and 3 deletions.
  1. +8 −0 CHANGES.rst
  2. +1 −1 src/urllib3/__init__.py
  3. +7 −2 src/urllib3/util/ssl_.py
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changes
=======

1.25.5 (2019-09-19)
-------------------

* Add mitigation for BPO-37428 affecting Python <3.7.4 and OpenSSL 1.1.1+ which
caused certificate verification to be enabled when using ``cert_reqs=CERT_NONE``.
(Issue #1682)


1.25.4 (2019-09-19)
-------------------

2 changes: 1 addition & 1 deletion src/urllib3/__init__.py
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@

__author__ = "Andrey Petrov (andrey.petrov@shazow.net)"
__license__ = "MIT"
__version__ = "1.25.4"
__version__ = "1.25.5"

__all__ = (
"HTTPConnectionPool",
9 changes: 7 additions & 2 deletions src/urllib3/util/ssl_.py
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
import errno
import warnings
import hmac
import sys

from binascii import hexlify, unhexlify
from hashlib import md5, sha1, sha256
@@ -274,8 +275,12 @@ def create_urllib3_context(
# Enable post-handshake authentication for TLS 1.3, see GH #1634. PHA is
# necessary for conditional client cert authentication with TLS 1.3.
# The attribute is None for OpenSSL <= 1.1.0 or does not exist in older
# versions of Python.
if getattr(context, "post_handshake_auth", None) is not None:
# versions of Python. We only enable on Python 3.7.4+ or if certificate
# verification is enabled to work around Python issue #37428
# See: https://bugs.python.org/issue37428
if (cert_reqs == ssl.CERT_REQUIRED or sys.version_info >= (3, 7, 4)) and getattr(
context, "post_handshake_auth", None
) is not None:
context.post_handshake_auth = True

context.verify_mode = cert_reqs