projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c52160
)
Automatically load SSL certs on Windows
author
Philipp Hagemeister
<phihag@phihag.de>
Sun, 8 Dec 2013 05:54:39 +0000
(06:54 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sun, 8 Dec 2013 05:54:39 +0000
(06:54 +0100)
youtube_dl/utils.py
patch
|
blob
|
history
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index 7b58788309d62cea379336861bbbee525be19075..a84aa59c22ac73d8fdd710a1b1c2fd8232e80722 100644
(file)
--- a/
youtube_dl/utils.py
+++ b/
youtube_dl/utils.py
@@
-561,11
+561,14
@@
def make_HTTPS_handler(opts_no_check_certificate):
return HTTPSHandlerV3()
else:
context = ssl.SSLContext(ssl.PROTOCOL_SSLv3)
- context.set_default_verify_paths()
-
context.verify_mode = (ssl.CERT_NONE
if opts_no_check_certificate
else ssl.CERT_REQUIRED)
+ context.set_default_verify_paths()
+ try:
+ context.load_default_certs()
+ except AttributeError:
+ pass # Python < 3.4
return compat_urllib_request.HTTPSHandler(context=context)
class ExtractorError(Exception):