diff options
author | Christian Heimes <christian@cheimes.de> | 2013-11-23 10:24:32 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-11-23 10:24:32 (GMT) |
commit | 2427b50fdda5eafa75a7b3345826ad805ba95d53 (patch) | |
tree | e33620a1a0f6c2ba4bccb6b9ac5f71aa1909ae77 /Lib/test/test_ssl.py | |
parent | 4a281a12f1aa430a6d14db633cc808e50427adeb (diff) | |
download | cpython-2427b50fdda5eafa75a7b3345826ad805ba95d53.zip cpython-2427b50fdda5eafa75a7b3345826ad805ba95d53.tar.gz cpython-2427b50fdda5eafa75a7b3345826ad805ba95d53.tar.bz2 |
Issue #8813: X509_VERIFY_PARAM is only available on OpenSSL 0.9.8+
The patch removes the verify_flags feature on Mac OS X 10.4 with OpenSSL 0.9.7l 28 Sep 2006.
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r-- | Lib/test/test_ssl.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 7374327..d6a7443 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -82,6 +82,10 @@ def no_sslv2_implies_sslv3_hello(): # 0.9.7h or higher return ssl.OPENSSL_VERSION_INFO >= (0, 9, 7, 8, 15) +def have_verify_flags(): + # 0.9.8 or higher + return ssl.OPENSSL_VERSION_INFO >= (0, 9, 8, 0, 15) + def asn1time(cert_time): # Some versions of OpenSSL ignore seconds, see #18207 # 0.9.8.i @@ -667,6 +671,8 @@ class ContextTests(unittest.TestCase): with self.assertRaises(ValueError): ctx.verify_mode = 42 + @unittest.skipUnless(have_verify_flags(), + "verify_flags need OpenSSL > 0.9.8") def test_verify_flags(self): ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1) # default value by OpenSSL @@ -1809,6 +1815,8 @@ else: self.assertLess(before, after) s.close() + @unittest.skipUnless(have_verify_flags(), + "verify_flags need OpenSSL > 0.9.8") def test_crl_check(self): if support.verbose: sys.stdout.write("\n") |