Issue #12049: test_ssl now checks also that RAND_bytes() raises an error if

there is not enough entropy.
This commit is contained in:
Victor Stinner 2011-05-25 11:15:16 +02:00
parent c13ef66649
commit 2e2baa9208
1 changed files with 2 additions and 0 deletions

View File

@ -109,6 +109,8 @@ class BasicSocketTests(unittest.TestCase):
if v:
data = ssl.RAND_bytes(16)
self.assertEqual(len(data), 16)
else:
self.assertRaises(ssl.SSLError, ssl.RAND_bytes, 16)
try:
ssl.RAND_egd(1)