From c84e769c2b4108e1218e09652cb3bce34c541f8a Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Sat, 27 Mar 2021 07:42:45 -0700 Subject: bpo-39616: clarify SSLContext.check_hostname effect (GH-18484) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It doesn't actually affect whether match_hostname() is called (it never is in this context any longer), but whether hostname verification occurs in the first place. (cherry picked from commit 9798cef92b882cd82a338d3368eaf3c4a32f5c2d) Co-authored-by: Ville Skyttä --- Doc/library/ssl.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 852091c..0bf0554 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -1878,7 +1878,7 @@ to speed up repeated connections from the same clients. .. attribute:: SSLContext.check_hostname - Whether to match the peer cert's hostname with :func:`match_hostname` in + Whether to match the peer cert's hostname in :meth:`SSLSocket.do_handshake`. The context's :attr:`~SSLContext.verify_mode` must be set to :data:`CERT_OPTIONAL` or :data:`CERT_REQUIRED`, and you must pass *server_hostname* to -- cgit v0.12