Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a9bf2ac7
Commit
a9bf2ac7
authored
Feb 17, 2012
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to really fix compilation failures of the _ssl module under very old OpenSSLs.
parent
f1fd388c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
Lib/ssl.py
Lib/ssl.py
+5
-1
Modules/_ssl.c
Modules/_ssl.c
+6
-0
No files found.
Lib/ssl.py
View file @
a9bf2ac7
...
@@ -68,12 +68,16 @@ from _ssl import (
...
@@ -68,12 +68,16 @@ from _ssl import (
from
_ssl
import
CERT_NONE
,
CERT_OPTIONAL
,
CERT_REQUIRED
from
_ssl
import
CERT_NONE
,
CERT_OPTIONAL
,
CERT_REQUIRED
from
_ssl
import
(
from
_ssl
import
(
OP_ALL
,
OP_NO_SSLv2
,
OP_NO_SSLv3
,
OP_NO_TLSv1
,
OP_ALL
,
OP_NO_SSLv2
,
OP_NO_SSLv3
,
OP_NO_TLSv1
,
OP_CIPHER_SERVER_PREFERENCE
,
OP_SINGLE_DH_USE
,
OP_SINGLE_ECDH_USE
,
OP_CIPHER_SERVER_PREFERENCE
,
OP_SINGLE_DH_USE
)
)
try
:
try
:
from
_ssl
import
OP_NO_COMPRESSION
from
_ssl
import
OP_NO_COMPRESSION
except
ImportError
:
except
ImportError
:
pass
pass
try
:
from
_ssl
import
OP_SINGLE_ECDH_USE
except
ImportError
:
pass
from
_ssl
import
RAND_status
,
RAND_egd
,
RAND_add
,
RAND_bytes
,
RAND_pseudo_bytes
from
_ssl
import
RAND_status
,
RAND_egd
,
RAND_add
,
RAND_bytes
,
RAND_pseudo_bytes
from
_ssl
import
(
from
_ssl
import
(
SSL_ERROR_ZERO_RETURN
,
SSL_ERROR_ZERO_RETURN
,
...
...
Modules/_ssl.c
View file @
a9bf2ac7
...
@@ -145,6 +145,12 @@ static unsigned int _ssl_locks_count = 0;
...
@@ -145,6 +145,12 @@ static unsigned int _ssl_locks_count = 0;
# define HAVE_OPENSSL_FINISHED 0
# define HAVE_OPENSSL_FINISHED 0
#endif
#endif
/* ECDH support got added to OpenSSL in 0.9.8 */
#if OPENSSL_VERSION_NUMBER < 0x0090800fL && !defined(OPENSSL_NO_ECDH)
# define OPENSSL_NO_ECDH
#endif
typedef
struct
{
typedef
struct
{
PyObject_HEAD
PyObject_HEAD
SSL_CTX
*
ctx
;
SSL_CTX
*
ctx
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment