mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
e4418609f7
commit
a5d2b4cb18
7 changed files with 747 additions and 577 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue