Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(76672)

Delta Between Two Patch Sets: Doc/whatsnew/3.4.rst

Issue 22417: PEP 476: verify HTTPS certificates by default
Left Patch Set: Created 4 years, 7 months ago
Right Patch Set: Created 4 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Doc/library/xmlrpc.client.rst ('k') | Lib/http/client.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 **************************** 1 ****************************
2 What's New In Python 3.4 2 What's New In Python 3.4
3 **************************** 3 ****************************
4 4
5 :Author: R. David Murray <rdmurray@bitdance.com> (Editor) 5 :Author: R. David Murray <rdmurray@bitdance.com> (Editor)
6 6
7 .. Rules for maintenance: 7 .. Rules for maintenance:
8 8
9 * Anyone can add text to this document, but the maintainer reserves the 9 * Anyone can add text to this document, but the maintainer reserves the
10 right to rewrite any additions. In particular, for obscure or esoteric 10 right to rewrite any additions. In particular, for obscure or esoteric
(...skipping 2515 matching lines...) Expand 10 before | Expand all | Expand 10 after
2526 import ssl 2526 import ssl
2527 2527
2528 # This disables all verification 2528 # This disables all verification
2529 context = ssl._create_unverified_context() 2529 context = ssl._create_unverified_context()
2530 2530
2531 # This allows using a specific certificate for the host, which doesn't need 2531 # This allows using a specific certificate for the host, which doesn't need
2532 # to be in the trust store 2532 # to be in the trust store
2533 context = ssl.create_default_context(cafile="/path/to/file.crt") 2533 context = ssl.create_default_context(cafile="/path/to/file.crt")
2534 2534
2535 urllib.request.urlopen("https://invalid-cert", context=context) 2535 urllib.request.urlopen("https://invalid-cert", context=context)
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+