diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-11-28 12:28:25 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-11-28 12:28:25 (GMT) |
commit | beeb512fe1d8c502d854d7e27742a7481bccd5c4 (patch) | |
tree | 8e89fe1a29f57d4ea5f0e095110f257d77680a00 /Lib/test/test_ssl.py | |
parent | 07ff92a0d2c98f55bd863cdc5d6f62975f4994e5 (diff) | |
download | cpython-beeb512fe1d8c502d854d7e27742a7481bccd5c4.zip cpython-beeb512fe1d8c502d854d7e27742a7481bccd5c4.tar.gz cpython-beeb512fe1d8c502d854d7e27742a7481bccd5c4.tar.bz2 |
Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The
availability of the function is checked during the compilation.
Patch written by Bernard Spil.
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r-- | Lib/test/test_ssl.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 06705b2..2a18cc4 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -168,8 +168,9 @@ class BasicSocketTests(unittest.TestCase): self.assertRaises(ValueError, ssl.RAND_bytes, -5) self.assertRaises(ValueError, ssl.RAND_pseudo_bytes, -5) - self.assertRaises(TypeError, ssl.RAND_egd, 1) - self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1) + if hasattr(ssl, 'RAND_egd'): + self.assertRaises(TypeError, ssl.RAND_egd, 1) + self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1) ssl.RAND_add("this is a random string", 75.0) @unittest.skipUnless(os.name == 'posix', 'requires posix') |