mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-04 00:57:07 -05:00 
			
		
		
		
	Automatically load SSL certs on Windows
This commit is contained in:
		@@ -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):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user