Merge lp:~corey.bryant/keystone/2014.1.4 into lp:~ubuntu-server-dev/keystone/icehouse

Proposed by Corey Bryant
Status: Merged
Merge reported by: Martin Pitt
Merged at revision: not available
Proposed branch: lp:~corey.bryant/keystone/2014.1.4
Merge into: lp:~ubuntu-server-dev/keystone/icehouse
Diff against target: 150 lines (+130/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/pep-0476.patch (+122/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~corey.bryant/keystone/2014.1.4
Reviewer Review Type Date Requested Status
Ubuntu Server Developers Pending
Review via email: mp+253695@code.launchpad.net
To post a comment you must log in.
lp:~corey.bryant/keystone/2014.1.4 updated
282. By Corey Bryant

* Support new version of Python 2.7 (LP: #1434575):
  - d/p/pep-0476.patch: PEP 476 updates.

Revision history for this message
Martin Pitt (pitti) wrote :

This was done already, see referenced bug.

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-03-19 09:32:05 +0000
3+++ debian/changelog 2015-03-20 18:24:58 +0000
4@@ -1,3 +1,10 @@
5+keystone (1:2014.1.4-0ubuntu1.1) UNRELEASED; urgency=medium
6+
7+ * Support new version of Python 2.7 (LP: #1434575):
8+ - d/p/pep-0476.patch: PEP 476 updates.
9+
10+ -- Corey Bryant <corey.bryant@canonical.com> Fri, 20 Mar 2015 09:56:45 -0400
11+
12 keystone (1:2014.1.4-0ubuntu1) trusty; urgency=medium
13
14 * Resynchronize with stable/icehouse (9aec35a) (LP: #1432608):
15
16=== added file 'debian/patches/pep-0476.patch'
17--- debian/patches/pep-0476.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/pep-0476.patch 2015-03-20 18:24:58 +0000
19@@ -0,0 +1,122 @@
20+Description: Deal with PEP-0476
21+Author: James Page <james.page@ubuntu.com>
22+Forwarded: Need to submit backports once trunk fix is merged:
23+ https://review.openstack.org/#/c/144988/
24+
25+--- a/keystone/tests/test_ssl.py
26++++ b/keystone/tests/test_ssl.py
27+@@ -35,8 +35,25 @@
28+ class SSLTestCase(tests.TestCase):
29+ def setUp(self):
30+ super(SSLTestCase, self).setUp()
31++ # NOTE(jamespage):
32++ # Deal with more secure certification chain verficiation
33++ # introduced in python 2.7.9 under PEP-0476
34++ # https://github.com/python/peps/blob/master/pep-0476.txta
35++ self.context = None
36++ if "_create_unverified_context" in dir(ssl):
37++ self.context = ssl._create_unverified_context()
38+ self.load_backends()
39+
40++ def get_HTTPSConnection(self, *args):
41++ """Simple helper to configure HTTPSConnection objects"""
42++ if self.context:
43++ return environment.httplib.HTTPSConnection(
44++ *args,
45++ context=self.context
46++ )
47++ else:
48++ return environment.httplib.HTTPSConnection(*args)
49++
50+ def test_1way_ssl_ok(self):
51+ """Make sure both public and admin API work with 1-way SSL."""
52+ paste_conf = self._paste_config('keystone')
53+@@ -44,7 +61,7 @@
54+
55+ # Verify Admin
56+ with appserver.AppServer(paste_conf, appserver.ADMIN, **ssl_kwargs):
57+- conn = environment.httplib.HTTPSConnection(
58++ conn = self.get_HTTPSConnection(
59+ '127.0.0.1', CONF.admin_port)
60+ conn.request('GET', '/')
61+ resp = conn.getresponse()
62+@@ -52,7 +69,7 @@
63+
64+ # Verify Public
65+ with appserver.AppServer(paste_conf, appserver.MAIN, **ssl_kwargs):
66+- conn = environment.httplib.HTTPSConnection(
67++ conn = self.get_HTTPSConnection(
68+ '127.0.0.1', CONF.public_port)
69+ conn.request('GET', '/')
70+ resp = conn.getresponse()
71+@@ -68,7 +85,7 @@
72+
73+ # Verify Admin
74+ with appserver.AppServer(paste_conf, appserver.ADMIN, **ssl_kwargs):
75+- conn = environment.httplib.HTTPSConnection(
76++ conn = self.get_HTTPSConnection(
77+ '127.0.0.1', CONF.admin_port, CLIENT, CLIENT)
78+ conn.request('GET', '/')
79+ resp = conn.getresponse()
80+@@ -76,7 +93,7 @@
81+
82+ # Verify Public
83+ with appserver.AppServer(paste_conf, appserver.MAIN, **ssl_kwargs):
84+- conn = environment.httplib.HTTPSConnection(
85++ conn = self.get_HTTPSConnection(
86+ '127.0.0.1', CONF.public_port, CLIENT, CLIENT)
87+ conn.request('GET', '/')
88+ resp = conn.getresponse()
89+@@ -91,14 +108,14 @@
90+
91+ # Verify Admin
92+ with appserver.AppServer(paste_conf, appserver.ADMIN, **ssl_kwargs):
93+- conn = environment.httplib.HTTPSConnection('::1', CONF.admin_port)
94++ conn = self.get_HTTPSConnection('::1', CONF.admin_port)
95+ conn.request('GET', '/')
96+ resp = conn.getresponse()
97+ self.assertEqual(300, resp.status)
98+
99+ # Verify Public
100+ with appserver.AppServer(paste_conf, appserver.MAIN, **ssl_kwargs):
101+- conn = environment.httplib.HTTPSConnection('::1', CONF.public_port)
102++ conn = self.get_HTTPSConnection('::1', CONF.public_port)
103+ conn.request('GET', '/')
104+ resp = conn.getresponse()
105+ self.assertEqual(300, resp.status)
106+@@ -116,7 +133,7 @@
107+
108+ # Verify Admin
109+ with appserver.AppServer(paste_conf, appserver.ADMIN, **ssl_kwargs):
110+- conn = environment.httplib.HTTPSConnection(
111++ conn = self.get_HTTPSConnection(
112+ '::1', CONF.admin_port, CLIENT, CLIENT)
113+ conn.request('GET', '/')
114+ resp = conn.getresponse()
115+@@ -124,7 +141,7 @@
116+
117+ # Verify Public
118+ with appserver.AppServer(paste_conf, appserver.MAIN, **ssl_kwargs):
119+- conn = environment.httplib.HTTPSConnection(
120++ conn = self.get_HTTPSConnection(
121+ '::1', CONF.public_port, CLIENT, CLIENT)
122+ conn.request('GET', '/')
123+ resp = conn.getresponse()
124+@@ -137,7 +154,7 @@
125+
126+ # Verify Admin
127+ with appserver.AppServer(paste_conf, appserver.ADMIN, **ssl_kwargs):
128+- conn = environment.httplib.HTTPSConnection(
129++ conn = self.get_HTTPSConnection(
130+ '127.0.0.1', CONF.admin_port)
131+ try:
132+ conn.request('GET', '/')
133+@@ -147,7 +164,7 @@
134+
135+ # Verify Public
136+ with appserver.AppServer(paste_conf, appserver.MAIN, **ssl_kwargs):
137+- conn = environment.httplib.HTTPSConnection(
138++ conn = self.get_HTTPSConnection(
139+ '127.0.0.1', CONF.public_port)
140+ try:
141+ conn.request('GET', '/')
142
143=== modified file 'debian/patches/series'
144--- debian/patches/series 2014-08-11 12:37:33 +0000
145+++ debian/patches/series 2015-03-20 18:24:58 +0000
146@@ -3,3 +3,4 @@
147 sql_connection.patch
148 add-version-info.patch
149 ubuntu-test-overrides.patch
150+pep-0476.patch

Subscribers

People subscribed via source and target branches