Issue #19781: ftplib now supports SSLContext.check_hostname and server name

indication for TLS/SSL connections.
This commit is contained in:
Christian Heimes 2013-12-02 02:56:02 +01:00
parent 1aa9a75fbf
commit e5b5edfa2c
4 changed files with 51 additions and 3 deletions

View file

@ -94,6 +94,11 @@ The module defines the following items:
.. versionchanged:: 3.3
*source_address* parameter was added.
.. versionchanged:: 3.4
The class now supports hostname check with
:attr:`SSLContext.check_hostname` and *Server Name Indicator* (see
:data:`~ssl.HAS_SNI`).
Here's a sample session using the :class:`FTP_TLS` class:
>>> from ftplib import FTP_TLS
@ -427,6 +432,11 @@ FTP_TLS Objects
Set up secure control connection by using TLS or SSL, depending on what
specified in :meth:`ssl_version` attribute.
.. versionchanged:: 3.4
The method now supports hostname check with
:attr:`SSLContext.check_hostname` and *Server Name Indicator* (see
:data:`~ssl.HAS_SNI`).
.. method:: FTP_TLS.ccc()
Revert control channel back to plaintext. This can be useful to take