summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-10-27 06:16:53 (GMT)
committerGeorg Brandl <georg@python.org>2013-10-27 06:16:53 (GMT)
commit72c98d3a761457a4f2b8054458b19f051dfb5886 (patch)
tree1e249a8d08022ec1b7cf24a03d88991dc1910681 /Doc
parentca580f4ec1b08f492cbc8673e316f5cadf47aec2 (diff)
downloadcpython-72c98d3a761457a4f2b8054458b19f051dfb5886.zip
cpython-72c98d3a761457a4f2b8054458b19f051dfb5886.tar.gz
cpython-72c98d3a761457a4f2b8054458b19f051dfb5886.tar.bz2
Issue #17997: Change behavior of ``ssl.match_hostname()`` to follow RFC 6125,
for security reasons. It now doesn't match multiple wildcards nor wildcards inside IDN fragments.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/ssl.rst15
1 files changed, 11 insertions, 4 deletions
diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst
index af727eb..a688e46 100644
--- a/Doc/library/ssl.rst
+++ b/Doc/library/ssl.rst
@@ -283,10 +283,10 @@ Certificate handling
Verify that *cert* (in decoded format as returned by
:meth:`SSLSocket.getpeercert`) matches the given *hostname*. The rules
applied are those for checking the identity of HTTPS servers as outlined
- in :rfc:`2818`, except that IP addresses are not currently supported.
- In addition to HTTPS, this function should be suitable for checking the
- identity of servers in various SSL-based protocols such as FTPS, IMAPS,
- POPS and others.
+ in :rfc:`2818` and :rfc:`6125`, except that IP addresses are not currently
+ supported. In addition to HTTPS, this function should be suitable for
+ checking the identity of servers in various SSL-based protocols such as
+ FTPS, IMAPS, POPS and others.
:exc:`CertificateError` is raised on failure. On success, the function
returns nothing::
@@ -301,6 +301,13 @@ Certificate handling
.. versionadded:: 3.2
+ .. versionchanged:: 3.3.3
+ The function now follows :rfc:`6125`, section 6.4.3 and does neither
+ match multiple wildcards (e.g. ``*.*.com`` or ``*a*.example.org``) nor
+ a wildcard inside an internationalized domain names (IDN) fragment.
+ IDN A-labels such as ``www*.xn--pthon-kva.org`` are still supported,
+ but ``x*.python.org`` no longer matches ``xn--tda.python.org``.
+
.. function:: cert_time_to_seconds(timestring)
Returns a floating-point value containing a normal seconds-after-the-epoch