summaryrefslogtreecommitdiff
path: root/Doc/library/asyncio-eventloop.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/asyncio-eventloop.rst')
-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 5dd258df31..33b86d6f03 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
----------------------