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
d345c1a0
Commit
d345c1a0
authored
Jul 09, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GreenSocket.wrap_ssl: accept arguments in the same order as standard wrap_ssl does
parent
4a966503
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
gevent/socket.py
gevent/socket.py
+5
-7
No files found.
gevent/socket.py
View file @
d345c1a0
...
...
@@ -726,17 +726,15 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT):
raise
error
,
msg
def
wrap_ssl
(
sock
,
certificate
=
None
,
private_key
=
None
):
# XXX order of arguments is different from socket.ssl ?
def
wrap_ssl
(
sock
,
keyfile
=
None
,
certfile
=
None
):
from
OpenSSL
import
SSL
context
=
SSL
.
Context
(
SSL
.
SSLv23_METHOD
)
if
cert
ificat
e
is
not
None
:
context
.
use_certificate_file
(
cert
ificat
e
)
if
private_key
is
not
None
:
context
.
use_privatekey_file
(
private_key
)
if
cert
fil
e
is
not
None
:
context
.
use_certificate_file
(
cert
fil
e
)
if
keyfile
is
not
None
:
context
.
use_privatekey_file
(
keyfile
)
context
.
set_verify
(
SSL
.
VERIFY_NONE
,
lambda
*
x
:
True
)
connection
=
SSL
.
Connection
(
context
,
sock
)
connection
.
set_connect_state
()
return
GreenSSL
(
connection
)
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