diff options
author | Christian Heimes <christian@python.org> | 2016-09-10 23:23:33 +0200 |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2016-09-10 23:23:33 +0200 |
commit | de56c23b9a770f4872dd5a89478b0b334cc7de86 (patch) | |
tree | 5b3169e3ab71262564d765c4ddf3635b6f592684 /Lib/asyncio | |
parent | 1dd2bfbd07e5256cb9b5fe0696026ee4798674ac (diff) | |
download | cpython-de56c23b9a770f4872dd5a89478b0b334cc7de86.tar.gz |
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.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/asyncio/test_utils.py b/Lib/asyncio/test_utils.py index 396e6aed56..ac8a8ef752 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() |