Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ssl keys log using SSLKEYLOGFILE env var for SSLContext (yt-dlp/yt-dlp#9531) #9543

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions yt_dlp/networking/_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import typing
import urllib.parse
import urllib.request
import os
luiso1979 marked this conversation as resolved.
Show resolved Hide resolved

from .exceptions import RequestError, UnsupportedRequest
from ..dependencies import certifi
Expand Down Expand Up @@ -119,6 +120,7 @@ def make_ssl_context(
use_certifi=True,
):
context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
context.keylog_filename = os.environ.get('SSLKEYLOGFILE')
luiso1979 marked this conversation as resolved.
Show resolved Hide resolved
context.check_hostname = verify
context.verify_mode = ssl.CERT_REQUIRED if verify else ssl.CERT_NONE

Expand Down