Merge lp:~corey.bryant/ubuntu/utopic/python-eventlet/0.13.0-1ubuntu3.2 into lp:ubuntu/utopic-proposed/python-eventlet

Proposed by Corey Bryant
Status: Merged
Approved by: Brian Murray
Approved revision: 26
Merged at revision: 26
Proposed branch: lp:~corey.bryant/ubuntu/utopic/python-eventlet/0.13.0-1ubuntu3.2
Merge into: lp:ubuntu/utopic-proposed/python-eventlet
Diff against target: 114 lines (+53/-20)
3 files modified
debian/changelog (+7/-0)
debian/patches/sslwrap.diff (+25/-12)
eventlet/green/ssl.py (+21/-8)
To merge this branch: bzr merge lp:~corey.bryant/ubuntu/utopic/python-eventlet/0.13.0-1ubuntu3.2
Reviewer Review Type Date Requested Status
Ubuntu Development Team Pending
Review via email: mp+250455@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

This was already uploaded.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-02-09 13:31:20 +0000
3+++ debian/changelog 2015-02-20 15:05:36 +0000
4@@ -1,3 +1,10 @@
5+python-eventlet (0.13.0-1ubuntu3.2) UNRELEASED; urgency=medium
6+
7+ * debian/patches/sslwrap.diff: Fall back to old behavior if SSLContext
8+ not available (LP: #1423675).
9+
10+ -- Corey Bryant <corey.bryant@canonical.com> Fri, 20 Feb 2015 09:42:26 -0500
11+
12 python-eventlet (0.13.0-1ubuntu3.1) utopic; urgency=medium
13
14 * debian/patches/socket-timeout.patch: Cherry-pick patch to provide
15
16=== modified file 'debian/patches/sslwrap.diff'
17--- debian/patches/sslwrap.diff 2014-10-08 16:22:45 +0000
18+++ debian/patches/sslwrap.diff 2015-02-20 15:05:36 +0000
19@@ -1,8 +1,6 @@
20-Index: b/eventlet/green/ssl.py
21-===================================================================
22 --- a/eventlet/green/ssl.py
23 +++ b/eventlet/green/ssl.py
24-@@ -238,14 +238,14 @@ class GreenSSLSocket(__ssl.SSLSocket):
25+@@ -238,17 +238,30 @@
26 if self._sslobj:
27 raise ValueError("attempt to connect already-connected SSLSocket!")
28 self._socket_connect(addr)
29@@ -10,18 +8,33 @@
30 - self._sslobj = _ssl.sslwrap(self._sock, False, self.keyfile, self.certfile,
31 - self.cert_reqs, self.ssl_version,
32 - self.ca_certs, self.ciphers)
33-- else:
34++ try:
35++ ctx = SSLContext(self.ssl_version)
36++ except:
37++ if has_ciphers:
38++ self._sslobj = _ssl.sslwrap(self._sock, False, self.keyfile, self.certfile,
39++ self.cert_reqs, self.ssl_version,
40++ self.ca_certs, self.ciphers)
41++ else:
42++ self._sslobj = _ssl.sslwrap(self._sock, False, self.keyfile, self.certfile,
43++ self.cert_reqs, self.ssl_version,
44++ self.ca_certs)
45+ else:
46 - self._sslobj = _ssl.sslwrap(self._sock, False, self.keyfile, self.certfile,
47 - self.cert_reqs, self.ssl_version,
48 - self.ca_certs)
49-+ ctx = SSLContext(self.ssl_version)
50-+ if self.keyfile or self.certfile:
51-+ ctx.load_cert_chain(self.certfile, self.keyfile)
52-+ if self.ca_certs:
53-+ ctx.load_verify_locations(self.ca_certs)
54-+ if has_ciphers and self.ciphers:
55-+ ctx.set_ciphers(self.ciphers)
56-+ self._sslobj = ctx._wrap_socket(self._sock, server_side=False)
57++ if self.keyfile or self.certfile:
58++ ctx.load_cert_chain(self.certfile, self.keyfile)
59++ if self.ca_certs:
60++ ctx.load_verify_locations(self.ca_certs)
61++ if has_ciphers and self.ciphers:
62++ ctx.set_ciphers(self.ciphers)
63++ self._sslobj = ctx._wrap_socket(self._sock, server_side=False)
64++
65 if self.do_handshake_on_connect:
66 self.do_handshake()
67
68++
69+ def accept(self):
70+ """Accepts a new connection from a remote client, and returns
71+ a tuple containing that new connection wrapped with a server-side
72
73=== modified file 'eventlet/green/ssl.py'
74--- eventlet/green/ssl.py 2014-10-08 16:22:45 +0000
75+++ eventlet/green/ssl.py 2015-02-20 15:05:36 +0000
76@@ -238,17 +238,30 @@
77 if self._sslobj:
78 raise ValueError("attempt to connect already-connected SSLSocket!")
79 self._socket_connect(addr)
80- ctx = SSLContext(self.ssl_version)
81- if self.keyfile or self.certfile:
82- ctx.load_cert_chain(self.certfile, self.keyfile)
83- if self.ca_certs:
84- ctx.load_verify_locations(self.ca_certs)
85- if has_ciphers and self.ciphers:
86- ctx.set_ciphers(self.ciphers)
87- self._sslobj = ctx._wrap_socket(self._sock, server_side=False)
88+ try:
89+ ctx = SSLContext(self.ssl_version)
90+ except:
91+ if has_ciphers:
92+ self._sslobj = _ssl.sslwrap(self._sock, False, self.keyfile, self.certfile,
93+ self.cert_reqs, self.ssl_version,
94+ self.ca_certs, self.ciphers)
95+ else:
96+ self._sslobj = _ssl.sslwrap(self._sock, False, self.keyfile, self.certfile,
97+ self.cert_reqs, self.ssl_version,
98+ self.ca_certs)
99+ else:
100+ if self.keyfile or self.certfile:
101+ ctx.load_cert_chain(self.certfile, self.keyfile)
102+ if self.ca_certs:
103+ ctx.load_verify_locations(self.ca_certs)
104+ if has_ciphers and self.ciphers:
105+ ctx.set_ciphers(self.ciphers)
106+ self._sslobj = ctx._wrap_socket(self._sock, server_side=False)
107+
108 if self.do_handshake_on_connect:
109 self.do_handshake()
110
111+
112 def accept(self):
113 """Accepts a new connection from a remote client, and returns
114 a tuple containing that new connection wrapped with a server-side

Subscribers

People subscribed via source and target branches

to all changes: