gh-94172: urllib.request avoids deprecated key_file/cert_file by vstinner · Pull Request #94232 · python/cpython
Conversation
The urllib.request module no longer uses the deprecated key_file and cert_file parameter of the http.client module.
vstinner
marked this pull request as ready for review
| # cert and key file means the user wants to authenticate. | ||
| # enable TLS 1.3 PHA implicitly even for custom contexts. | ||
| if context.post_handshake_auth is not None: | ||
| context.post_handshake_auth = True |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This post_handshake_auth code is already in _create_https_context(), but I copied Python 3.11 code which also checks again post_handshake_auth after calling load_cert_chain().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters