author | Håvard Flaget Aasen
<haavard_aasen@yahoo.no> 2020-04-05 06:28:10 UTC |
committer | Håvard Flaget Aasen
<haavard_aasen@yahoo.no> 2020-04-05 06:28:10 UTC |
parent | 78d1549172adb8bc65b7cdfbb810a5d8e82197f5 |
debian/changelog | +2 | -0 |
debian/patches/0001-tests-Add-missing-conn.getresponse-which-was-causing.patch | +30 | -0 |
debian/patches/series | +1 | -0 |
diff --git a/debian/changelog b/debian/changelog index 00f782c..a0f4a99 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ kxd (0.14-1.1) UNRELEASED; urgency=medium * Non-maintainer upload. * Set absolute path in d/rules closes: #952332 + * Cherry-pick upstream commit, needed for upstream testsuite. + 0001-tests-Add-missing-conn.getresponse-which-was-causing.patch -- Håvard Flaget Aasen <haavard_aasen@yahoo.no> Sun, 05 Apr 2020 08:13:28 +0200 diff --git a/debian/patches/0001-tests-Add-missing-conn.getresponse-which-was-causing.patch b/debian/patches/0001-tests-Add-missing-conn.getresponse-which-was-causing.patch new file mode 100644 index 0000000..61d840b --- /dev/null +++ b/debian/patches/0001-tests-Add-missing-conn.getresponse-which-was-causing.patch @@ -0,0 +1,30 @@ +From: Alberto Bertogli <albertito@blitiri.com.ar> +Date: Sun, 29 Mar 2020 11:40:46 +0100 +Subject: tests: Add missing conn.getresponse() which was causing false + negatives + +Somewhere around Python 3.8, http.client.HTTPConnection objects changed +how result handling was done, and ignored SSL errors until +.getresponse() was called. + +This causes the test_no_local_cert to fail, even though the server is +responding correctly. + +This patch fixes this by adding a .getresponse() call, which forces +validation of the result and makes the test pass again. +--- + tests/run_tests | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/run_tests b/tests/run_tests +index d6d4ba2..9499bfe 100755 +--- a/tests/run_tests ++++ b/tests/run_tests +@@ -407,6 +407,7 @@ class TrickyRequests(TestCase): + conn = self.https_connection("localhost", 19840) + try: + conn.request("GET", "/v1/") ++ conn.getresponse() + conn.close() + except ssl.SSLError as err: + self.assertEqual(err.reason, "SSLV3_ALERT_BAD_CERTIFICATE") diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..3196939 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-tests-Add-missing-conn.getresponse-which-was-causing.patch