[Python-checkins] cpython (2.7): Closes #15793: Stack corruption in ssl.RAND_egd(). Python 2.7 hasn't any issue
jesus.cea
python-checkins at python.org
Tue Sep 11 02:23:59 CEST 2012
http://hg.python.org/cpython/rev/706115cb2cdb
changeset: 78982:706115cb2cdb
branch: 2.7
parent: 78979:39efccf7a167
user: Jesus Cea <jcea at jcea.es>
date: Tue Sep 11 01:55:04 2012 +0200
summary:
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
files:
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
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -95,12 +95,8 @@
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):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list