Show More
@@ -34,7 +34,7 b' except ImportError:' | |||||
34 |
|
34 | |||
35 | import socket, httplib |
|
35 | import socket, httplib | |
36 |
|
36 | |||
37 |
def ssl_wrap_socket(sock, key |
|
37 | def ssl_wrap_socket(sock, keyfile, certfile, ssl_version=PROTOCOL_TLSv1, | |
38 | cert_reqs=CERT_REQUIRED, ca_certs=None): |
|
38 | cert_reqs=CERT_REQUIRED, ca_certs=None): | |
39 | if not util.safehasattr(socket, 'ssl'): |
|
39 | if not util.safehasattr(socket, 'ssl'): | |
40 | raise util.Abort(_('Python SSL support not found')) |
|
40 | raise util.Abort(_('Python SSL support not found')) | |
@@ -42,7 +42,7 b' except ImportError:' | |||||
42 | raise util.Abort(_( |
|
42 | raise util.Abort(_( | |
43 | 'certificate checking requires Python 2.6')) |
|
43 | 'certificate checking requires Python 2.6')) | |
44 |
|
44 | |||
45 |
ssl = socket.ssl(sock, key |
|
45 | ssl = socket.ssl(sock, keyfile, certfile) | |
46 | return httplib.FakeSocket(sock, ssl) |
|
46 | return httplib.FakeSocket(sock, ssl) | |
47 |
|
47 | |||
48 | def _verifycert(cert, hostname): |
|
48 | def _verifycert(cert, hostname): |
General Comments 0
You need to be logged in to leave comments.
Login now