summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJesus Cea <jcea@jcea.es>2012-09-10 23:55:04 (GMT)
committerJesus Cea <jcea@jcea.es>2012-09-10 23:55:04 (GMT)
commita8a5b397c1a30568be1309ed265b696da84eeca0 (patch)
treef0b129d085f37807d620111c6c9d2e16963c9a5f /Lib
parent8e03b4cae0cf37aac52827523fb3cf56894ffdf9 (diff)
downloadcpython-a8a5b397c1a30568be1309ed265b696da84eeca0.zip
cpython-a8a5b397c1a30568be1309ed265b696da84eeca0.tar.gz
cpython-a8a5b397c1a30568be1309ed265b696da84eeca0.tar.bz2
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
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ssl.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index e643f74..58da942 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):