mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
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.
This commit is contained in:
parent
130bbe5fd3
commit
d04863771b
23 changed files with 189 additions and 85 deletions
|
@ -77,9 +77,9 @@ if ssl:
|
|||
|
||||
def get_request(self):
|
||||
newsocket, fromaddr = self.socket.accept()
|
||||
connstream = ssl.wrap_socket(newsocket,
|
||||
server_side=True,
|
||||
certfile=CERTFILE)
|
||||
context = ssl.SSLContext()
|
||||
context.load_cert_chain(CERTFILE)
|
||||
connstream = context.wrap_socket(newsocket, server_side=True)
|
||||
return connstream, fromaddr
|
||||
|
||||
IMAP4_SSL = imaplib.IMAP4_SSL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue