python-urllib3/urllib3-ssl-default-context.patch
Tomáš Chvátal 627a9e53e9 - Update to 1.24:
* Allow key_server_hostname to be specified when initializing a PoolManager to allow custom SNI to be overridden. (Pull #1449)
  * Test against Python 3.7 on AppVeyor. (Pull #1453)
  * Early-out ipv6 checks when running on App Engine. (Pull #1450)
  * Change ambiguous description of backoff_factor (Pull #1436)
  * Add ability to handle multiple Content-Encodings (Issue #1441 and Pull #1442)
  * Skip DNS names that can't be idna-decoded when using pyOpenSSL (Issue #1405).
  * Add a server_hostname parameter to HTTPSConnection which allows for overriding the SNI hostname sent in the handshake. (Pull #1397)
  * Drop support for EOL Python 2.6 (Pull #1429 and Pull #1430)
  * Fixed bug where responses with header Content-Type: message/* erroneously raised HeaderParsingError, resulting in a warning being logged. (Pull #1439)
  * Move urllib3 to src/urllib3 (Pull #1409)
- Drop patch 1414.patch merged upstream
- Refresh patches:
  * python-urllib3-recent-date.patch
  * urllib3-ssl-default-context.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=53
2018-11-01 14:22:21 +00:00

14 lines
661 B
Diff

Index: urllib3-1.21.1/src/urllib3/util/ssl_.py
===================================================================
--- urllib3-1.21.1.orig/src/urllib3/util/ssl_.py
+++ urllib3-1.21.1/src/urllib3/util/ssl_.py
@@ -318,6 +318,8 @@ def ssl_wrap_socket(sock, keyfile=None,
elif getattr(context, 'load_default_certs', None) is not None:
# try to load OS default certs; works well on Windows (require Python3.4+)
context.load_default_certs()
+ elif cert_reqs != ssl.CERT_NONE and hasattr(context, 'set_default_verify_paths'):
+ context.set_default_verify_paths()
if certfile:
context.load_cert_chain(certfile, keyfile)