homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jfunk
Recipients eric.araujo, jfunk, pitrou
Date 2012年05月11日.18:06:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1336759586.44.0.817991229384.issue14780@psf.upfronthosting.co.za>
In-reply-to
Content
Something like this perhaps?
--- a/Lib/urllib/request.py Fri May 11 13:11:02 2012 -0400
+++ b/Lib/urllib/request.py Fri May 11 11:03:02 2012 -0700
@@ -135,16 +135,19 @@
 
 _opener = None
 def urlopen(url, data=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
- *, cafile=None, capath=None):
+ *, cafile=None, capath=None, cadefault=True):
 global _opener
 if cafile or capath:
 if not _have_ssl:
 raise ValueError('SSL support not available')
 context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
 context.options |= ssl.OP_NO_SSLv2
- if cafile or capath:
+ if cafile or capath or cadefault:
 context.verify_mode = ssl.CERT_REQUIRED
- context.load_verify_locations(cafile, capath)
+ if cafile or capath:
+ context.load_verify_locations(cafile, capath)
+ else:
+ context.load_default_verify_locations()
 check_hostname = True
 else:
 check_hostname = False
History
Date User Action Args
2012年05月11日 18:06:26jfunksetrecipients: + jfunk, pitrou, eric.araujo
2012年05月11日 18:06:26jfunksetmessageid: <1336759586.44.0.817991229384.issue14780@psf.upfronthosting.co.za>
2012年05月11日 18:06:25jfunklinkissue14780 messages
2012年05月11日 18:06:25jfunkcreate

AltStyle によって変換されたページ (->オリジナル) /