bpo-33734: asyncio/ssl: a bunch of bugfixes (GH-7321) (GH-7396)
* Fix AttributeError (not all SSL exceptions have 'errno' attribute)
* Increase default handshake timeout from 10 to 60 seconds
* Make sure start_tls can be cancelled correctly
* Make sure any error in SSLProtocol gets propagated (instead of just being logged)
(cherry picked from commit 9602643120a509858d0bee4215d7f150e6125468)
Co-authored-by: Yury Selivanov <yury@magic.io>
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
index 40946bb..e4e6322 100644
--- a/Lib/asyncio/events.py
+++ b/Lib/asyncio/events.py
@@ -352,8 +352,7 @@
ssl_handshake_timeout is the time in seconds that an SSL server
will wait for completion of the SSL handshake before aborting the
- connection. Default is 10s, longer timeouts may increase vulnerability
- to DoS attacks (see https://support.f5.com/csp/article/K13834)
+ connection. Default is 60s.
start_serving set to True (default) causes the created server
to start accepting connections immediately. When set to False,
@@ -411,7 +410,7 @@
accepted connections.
ssl_handshake_timeout is the time in seconds that an SSL server
- will wait for the SSL handshake to complete (defaults to 10s).
+ will wait for the SSL handshake to complete (defaults to 60s).
start_serving set to True (default) causes the created server
to start accepting connections immediately. When set to False,