mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
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.
This commit is contained in:
parent
07ff92a0d2
commit
beeb512fe1
7 changed files with 65 additions and 3 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue