diff options
author | Jesus Cea <jcea@jcea.es> | 2012-09-11 00:00:58 (GMT) |
---|---|---|
committer | Jesus Cea <jcea@jcea.es> | 2012-09-11 00:00:58 (GMT) |
commit | c8754a13e607ebc70f12a10297c76dc574a91d5b (patch) | |
tree | 55422157d1be2e8443251a5ed15bb7a7bd15ad18 /Lib | |
parent | e8db356cf1084105a97db9457a2374209868005b (diff) | |
download | cpython-c8754a13e607ebc70f12a10297c76dc574a91d5b.zip cpython-c8754a13e607ebc70f12a10297c76dc574a91d5b.tar.gz cpython-c8754a13e607ebc70f12a10297c76dc574a91d5b.tar.bz2 |
Closes #15793: Stack corruption in ssl.RAND_egd()
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_ssl.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 551151e..d4c5e63 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -103,12 +103,8 @@ class BasicSocketTests(unittest.TestCase): sys.stdout.write("\n RAND_status is %d (%s)\n" % (v, (v and "sufficient randomness") or "insufficient randomness")) - try: - ssl.RAND_egd(1) - except TypeError: - pass - else: - print("didn't raise TypeError") + 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) def test_parse_cert(self): |