From a8a5b397c1a30568be1309ed265b696da84eeca0 Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Tue, 11 Sep 2012 01:55:04 +0200 Subject: [PATCH] Closes #15793: Stack corruption in ssl.RAND_egd(). Python 2.7 hasn't any issue about this, but add a test just to be sure --- Lib/test/test_ssl.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index e643f7493a..58da942f49 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -95,12 +95,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): -- 2.40.0