python-urllib3/python-urllib3-default-ssl-cert-validate.patch

31 lines
1.3 KiB
Diff
Raw Normal View History

2013-08-22 18:50:14 +00:00
From 2d80688fab4ae0af2d4bd20568c328bd2aae128c Mon Sep 17 00:00:00 2001
From: Ralph Bean <rbean@redhat.com>
Date: Thu, 22 Aug 2013 14:18:45 -0400
Subject: [PATCH] Require SSL certificate validation by default by using
2013-02-28 14:56:18 +00:00
CERT_REQUIRED and using the system /etc/ssl/certs/ca-certificates.crt
2013-08-22 18:50:14 +00:00
2013-02-28 14:56:18 +00:00
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=855320
2013-08-22 18:50:14 +00:00
Bug-Ubuntu: https://launchpad.net/bugs/1047054
---
urllib3/connectionpool.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
2013-02-28 14:56:18 +00:00
2013-08-22 18:50:14 +00:00
diff --git a/urllib3/connectionpool.py b/urllib3/connectionpool.py
index 621e1a8..7f4c322 100644
--- a/urllib3/connectionpool.py
+++ b/urllib3/connectionpool.py
@@ -556,8 +556,8 @@ class HTTPSConnectionPool(HTTPConnectionPool):
2013-02-28 14:56:18 +00:00
strict=False, timeout=None, maxsize=1,
block=False, headers=None,
2013-08-22 18:50:14 +00:00
_proxy=None, _proxy_headers=None,
- key_file=None, cert_file=None, cert_reqs=None,
- ca_certs=None, ssl_version=None,
+ key_file=None, cert_file=None, cert_reqs=ssl.CERT_REQUIRED,
+ ca_certs='/etc/ssl/certs/ca-certificates.crt', ssl_version=None,
assert_hostname=None, assert_fingerprint=None):
2013-02-28 14:56:18 +00:00
2013-08-22 18:50:14 +00:00
HTTPConnectionPool.__init__(self, host, port,
--
1.8.3.1