summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2016-09-10 21:23:33 (GMT)
committerChristian Heimes <christian@python.org>2016-09-10 21:23:33 (GMT)
commitd04863771b0c5bedeb1e4afe05dcba3adcc0fb58 (patch)
treefcd2630f24f426d5c1b084a9e16fe69ae4f5143a /Lib/asyncio
parent130bbe5fd3d0bd0c494078aff19a5f8108707b89 (diff)
downloadcpython-d04863771b0c5bedeb1e4afe05dcba3adcc0fb58.zip
cpython-d04863771b0c5bedeb1e4afe05dcba3adcc0fb58.tar.gz
cpython-d04863771b0c5bedeb1e4afe05dcba3adcc0fb58.tar.bz2
Issue #28022: Deprecate ssl-related arguments in favor of SSLContext.
The deprecation include manual creation of SSLSocket and certfile/keyfile (or similar) in ftplib, httplib, imaplib, smtplib, poplib and urllib. ssl.wrap_socket() is not marked as deprecated yet.
Diffstat (limited to 'Lib/asyncio')
-rw-r--r--Lib/asyncio/test_utils.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/asyncio/test_utils.py b/Lib/asyncio/test_utils.py
index 396e6ae..ac8a8ef 100644
--- a/Lib/asyncio/test_utils.py
+++ b/Lib/asyncio/test_utils.py
@@ -117,10 +117,10 @@ class SSLWSGIServerMixin:
'test', 'test_asyncio')
keyfile = os.path.join(here, 'ssl_key.pem')
certfile = os.path.join(here, 'ssl_cert.pem')
- ssock = ssl.wrap_socket(request,
- keyfile=keyfile,
- certfile=certfile,
- server_side=True)
+ context = ssl.SSLContext()
+ context.load_cert_chain(certfile, keyfile)
+
+ ssock = context.wrap_socket(request, server_side=True)
try:
self.RequestHandlerClass(ssock, client_address, self)
ssock.close()