diff options
author | Marc-André Lemburg <mal@egenix.com> | 2002-02-16 18:23:30 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2002-02-16 18:23:30 (GMT) |
commit | a5d2b4cb180ec87d006d63f838860fba785bcad0 (patch) | |
tree | f1ddd4ab82b92077aa8a316639cbdce9ff3370b5 /Lib/socket.py | |
parent | e4418609f79b94b91bda2621b5e6f067fb6a31d5 (diff) | |
download | cpython-a5d2b4cb180ec87d006d63f838860fba785bcad0.zip cpython-a5d2b4cb180ec87d006d63f838860fba785bcad0.tar.gz cpython-a5d2b4cb180ec87d006d63f838860fba785bcad0.tar.bz2 |
Break SSL support out of _socket module and place it into a new
helper module _ssl.
The support for the RAND_* APIs in _ssl is now only enabled
for OpenSSL 0.9.5 and up since they were added in that
release.
Note that socketmodule.* should really be renamed to _socket.* --
unfortunately, this seems to lose the CVS history of the file.
Please review and test... I was only able to test the header file
chaos in socketmodule.c/h on Linux. The test run through fine
and compiles don't give errors or warnings.
WARNING: This patch does *not* include changes to the various
non-Unix build process files.
Diffstat (limited to 'Lib/socket.py')
-rw-r--r-- | Lib/socket.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/socket.py b/Lib/socket.py index d2ac593..c460c5f 100644 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -39,6 +39,10 @@ the setsockopt() and getsockopt() methods. """ from _socket import * +try: + from _ssl import * +except ImportError: + pass import os, sys @@ -56,7 +60,7 @@ if (sys.platform.lower().startswith("win") return _socketobject(_realsocketcall(family, type, proto)) try: - _realsslcall = _socket.ssl + _realsslcall = _ssl.ssl except AttributeError: pass # No ssl else: |