diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2014-07-21 22:35:01 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2014-07-21 22:35:01 (GMT) |
commit | 4e64d8768f735cb98e50472921b57a7da508ee80 (patch) | |
tree | 60cdd0b4a47d23a9662abf7b2254fe0890256a18 | |
parent | b606d45fb26d38ba00b06a4349fd05172ba9e12c (diff) | |
download | cpython-4e64d8768f735cb98e50472921b57a7da508ee80.zip cpython-4e64d8768f735cb98e50472921b57a7da508ee80.tar.gz cpython-4e64d8768f735cb98e50472921b57a7da508ee80.tar.bz2 |
Issue #21976: Fix test_ssl to accept LibreSSL version strings.
Thanks to William Orr.
-rw-r--r-- | Lib/test/test_ssl.py | 16 | ||||
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS | 6 |
3 files changed, 17 insertions, 6 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 37a0cdb..91b8029 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -175,11 +175,11 @@ class BasicSocketTests(unittest.TestCase): # Some sanity checks follow # >= 0.9 self.assertGreaterEqual(n, 0x900000) - # < 2.0 - self.assertLess(n, 0x20000000) + # < 3.0 + self.assertLess(n, 0x30000000) major, minor, fix, patch, status = t self.assertGreaterEqual(major, 0) - self.assertLess(major, 2) + self.assertLess(major, 3) self.assertGreaterEqual(minor, 0) self.assertLess(minor, 256) self.assertGreaterEqual(fix, 0) @@ -188,9 +188,13 @@ class BasicSocketTests(unittest.TestCase): self.assertLessEqual(patch, 26) self.assertGreaterEqual(status, 0) self.assertLessEqual(status, 15) - # Version string as returned by OpenSSL, the format might change - self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)), - (s, t)) + # Version string as returned by {Open,Libre}SSL, the format might change + if "LibreSSL" in s: + self.assertTrue(s.startswith("LibreSSL {:d}.{:d}".format(major, minor)), + (s, t)) + else: + self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)), + (s, t)) @test_support.requires_resource('network') def test_ciphers(self): @@ -981,6 +981,7 @@ Piet van Oostrum Tomas Oppelstrup Jason Orendorff Douglas Orr +William Orr Michele OrrĂ¹ Oleg Oshmyan Denis S. Otkidach @@ -37,6 +37,12 @@ Library - Issue #21323: Fix CGIHTTPServer to again handle scripts in CGI subdirectories, broken by the fix for security issue #19435. Patch by Zach Byrne. +Tests +----- + +- Issue #21976: Fix test_ssl to accept LibreSSL version strings. Thanks + to William Orr. + What's New in Python 2.7.8? =========================== |