Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
f599b34e
Commit
f599b34e
authored
Mar 16, 2015
by
Jason
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2 from Eugeny/cpython2.7.9
Work around missing sslwrap in Python 2.7.9 (fixes #477) #481
parents
ac1b6095
edd26a72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
8 deletions
+25
-8
gevent/_ssl2.py
gevent/_ssl2.py
+25
-8
No files found.
gevent/_ssl2.py
View file @
f599b34e
...
...
@@ -62,6 +62,8 @@ class SSLSocket(socket):
ssl_version
=
PROTOCOL_SSLv23
,
ca_certs
=
None
,
do_handshake_on_connect
=
True
,
suppress_ragged_eofs
=
True
,
server_hostname
=
None
,
_context
=
None
,
ciphers
=
None
):
socket
.
__init__
(
self
,
_sock
=
sock
)
...
...
@@ -80,15 +82,30 @@ class SSLSocket(socket):
self
.
_sslobj
=
None
else
:
# yes, create the SSL object
if
ciphers
is
None
:
self
.
_sslobj
=
_ssl
.
sslwrap
(
self
.
_sock
,
server_side
,
keyfile
,
certfile
,
cert_reqs
,
ssl_version
,
ca_certs
)
if
hasattr
(
_ssl
,
'sslwrap'
):
if
ciphers
is
None
:
self
.
_sslobj
=
_ssl
.
sslwrap
(
self
.
_sock
,
server_side
,
keyfile
,
certfile
,
cert_reqs
,
ssl_version
,
ca_certs
)
else
:
self
.
_sslobj
=
_ssl
.
sslwrap
(
self
.
_sock
,
server_side
,
keyfile
,
certfile
,
cert_reqs
,
ssl_version
,
ca_certs
,
ciphers
)
else
:
self
.
_sslobj
=
_ssl
.
sslwrap
(
self
.
_sock
,
server_side
,
keyfile
,
certfile
,
cert_reqs
,
ssl_version
,
ca_certs
,
ciphers
)
if
_context
:
self
.
context
=
_context
else
:
self
.
context
=
__ssl__
.
SSLContext
(
ssl_version
)
self
.
context
.
verify_mode
=
cert_reqs
if
ca_certs
:
self
.
context
.
load_verify_locations
(
ca_certs
)
if
certfile
:
self
.
context
.
load_cert_chain
(
certfile
,
keyfile
)
if
ciphers
:
self
.
context
.
set_ciphers
(
ciphers
)
self
.
_sslobj
=
self
.
context
.
_wrap_socket
(
self
.
_sock
,
server_side
=
server_side
,
ssl_sock
=
self
,
server_hostname
=
server_hostname
)
if
do_handshake_on_connect
:
self
.
do_handshake
()
self
.
keyfile
=
keyfile
...
...
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