From 481ac5e12ca82b27b48500626718ef8a8b1457b8 Mon Sep 17 00:00:00 2001 From: josemgarciar <114011530+josemgarciar@users.noreply.github.com> Date: Fri, 8 Mar 2024 11:06:35 +0100 Subject: [PATCH] =?UTF-8?q?Co-authored-by:=20Juli=C3=A1n=20Romero=20Parejo?= =?UTF-8?q?=20=20Co-authored-by:=20FernandoTC18=20=20Maintenance=20and=20sec?= =?UTF-8?q?urity=20problems?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- youtube_dl/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index ab8bf24b8..7d37626cd 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -2360,7 +2360,7 @@ def make_HTTPS_handler(params, **kwargs): set_alpn_protocols(context) if opts_no_check_certificate: context.check_hostname = False - context.verify_mode = ssl.CERT_NONE + context.verify_mode = ssl.CERT_REQUIRED try: return YoutubeDLHTTPSHandler(params, context=context, **kwargs) @@ -2373,7 +2373,7 @@ def make_HTTPS_handler(params, **kwargs): return YoutubeDLHTTPSHandler(params, **kwargs) else: # Python3 < 3.4 context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2) - context.verify_mode = (ssl.CERT_NONE + context.verify_mode = (ssl.CERT_REQUIRED if opts_no_check_certificate else ssl.CERT_REQUIRED) context.set_default_verify_paths()