summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2017-12-30 05:35:36 (GMT)
committerGitHub <noreply@github.com>2017-12-30 05:35:36 (GMT)
commitf111b3dcb414093a4efb9d74b69925e535ddc470 (patch)
tree9905a970a809f7f14cb378b5b90f1f9d06aebbeb /Doc/library
parentbbdb17d19bb1d5443ca4417254e014ad64c04540 (diff)
downloadcpython-f111b3dcb414093a4efb9d74b69925e535ddc470.zip
cpython-f111b3dcb414093a4efb9d74b69925e535ddc470.tar.gz
cpython-f111b3dcb414093a4efb9d74b69925e535ddc470.tar.bz2
bpo-23749: Implement loop.start_tls() (#5039)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/asyncio-eventloop.rst32
1 files changed, 32 insertions, 0 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index 5dd258d..33b86d6 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -537,6 +537,38 @@ Creating listening connections
.. versionadded:: 3.5.3
+TLS Upgrade
+-----------
+
+.. coroutinemethod:: AbstractEventLoop.start_tls(transport, protocol, sslcontext, \*, server_side=False, server_hostname=None, ssl_handshake_timeout=None)
+
+ Upgrades an existing connection to TLS.
+
+ Returns a new transport instance, that the *protocol* must start using
+ immediately after the *await*. The *transport* instance passed to
+ the *start_tls* method should never be used again.
+
+ Parameters:
+
+ * *transport* and *protocol* instances that methods like
+ :meth:`~AbstractEventLoop.create_server` and
+ :meth:`~AbstractEventLoop.create_connection` return.
+
+ * *sslcontext*: a configured instance of :class:`~ssl.SSLContext`.
+
+ * *server_side* pass ``True`` when a server-side connection is being
+ upgraded (like the one created by :meth:`~AbstractEventLoop.create_server`).
+
+ * *server_hostname*: sets or overrides the host name that the target
+ server's certificate will be matched against.
+
+ * *ssl_handshake_timeout* is (for an SSL connection) the time in seconds to
+ wait for the SSL handshake to complete before aborting the connection.
+ ``10.0`` seconds if ``None`` (default).
+
+ .. versionadded:: 3.7
+
+
Watch file descriptors
----------------------