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.
This commit is contained in:
Marc-André Lemburg 2002-02-16 18:23:30 +00:00
parent e4418609f7
commit a5d2b4cb18
7 changed files with 747 additions and 577 deletions

View file

@ -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: