diff options
Diffstat (limited to 'Lib/socket.py')
-rw-r--r-- | Lib/socket.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/socket.py b/Lib/socket.py index bffea15..fca44ea 100644 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -65,6 +65,10 @@ __all__ = ["getfqdn"] __all__.extend(os._get_exports_list(_socket)) if _have_ssl: __all__.extend(os._get_exports_list(_ssl)) + def ssl(sock, keyfile=None, certfile=None): + import ssl as realssl + return realssl.sslwrap_simple(sock, keyfile, certfile) + __all__.append("ssl") # WSA error codes if sys.platform.lower().startswith("win"): |