[issue46322] Invalid file path of SSLKEYLOGFILE throw FileNotFoundError

2022-01-10 Thread SinaGhaaf
Change by SinaGhaaf : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue46322] Invalid file path of SSLKEYLOGFILE throw FileNotFoundError

2022-01-10 Thread Christian Heimes
Christian Heimes added the comment: The code works as intended and design. The keylog file is created in append-only mode when the file does not exist yet. A missing, inaccessible, or read-only directory or an invalid path raise an exception by design. Errors should not pass silently. The er

[issue46322] Invalid file path of SSLKEYLOGFILE throw FileNotFoundError

2022-01-09 Thread SinaGhaaf
New submission from SinaGhaaf : An existence check of 'keylogfile' is missed at https://github.com/python/cpython/blob/main/Lib/ssl.py#L779, if the file path does not exist, it tries to set 'context.keylog_filename' to an invalid file, and the result would be 'FileNotFoundError'. The followi