From: Ben Darnell Date: Mon, 18 Jun 2012 06:04:56 +0000 (-0700) Subject: Get rid of test_sslv2_fail. X-Git-Tag: v2.4.0~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56da4149fdaa2becf06f247b80d7dc036a8dfce4;p=thirdparty%2Ftornado.git Get rid of test_sslv2_fail. This test is more trouble than it's worth since many distributions have hacked sslv2 support out of their builds in various ways, and at least one (python 2.6 on ubuntu 11.10, which happens to be the platform used on travis-ci) has a bug that results in a segfault, killing the whole test process. --- diff --git a/.travis.yml b/.travis.yml index 525033dca..88837e45e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,6 @@ python: - pypy - 3.2 matrix: - allow_failures: - # The build of 2.6 on travis has a bug related to ssl (it segfaults in - # test_sslv2_fail) - - python: 2.6 include: - python: 2.5 env: FULL="true" @@ -22,7 +18,6 @@ matrix: env: LANG="en_US.utf-8" - python: 3.2 env: LANG="C" -# TODO: install pycurl, twisted, etc (depends on python version) install: - if [[ $TRAVIS_PYTHON_VERSION == '2.5' ]]; then pip install --use-mirrors simplejson; fi - if [[ $FULL == 'true' ]]; then sudo apt-get install librtmp-dev; pip install --use-mirrors MySQL-python pycurl; fi diff --git a/tornado/test/httpserver_test.py b/tornado/test/httpserver_test.py index 6503965cb..5237e75e4 100644 --- a/tornado/test/httpserver_test.py +++ b/tornado/test/httpserver_test.py @@ -101,32 +101,6 @@ class TLSv1Test(BaseSSLTest, SSLTestMixin): return ssl.PROTOCOL_TLSv1 -class SSLv2Test(BaseSSLTest): - def get_ssl_options(self): - return dict(ssl_version=ssl.PROTOCOL_SSLv2, - **AsyncHTTPSTestCase.get_ssl_options(self)) - - def test_sslv2_fail(self): - # This is really more of a client test, but run it here since - # we've got all the other ssl version tests here. - # Clients should have SSLv2 disabled by default. - try: - # The server simply closes the connection when it gets - # an SSLv2 ClientHello packet. - # request_timeout is needed here because on some platforms - # (cygwin, but not native windows python), the close is not - # detected promptly. - response = self.fetch('/', request_timeout=1) - except ssl.SSLError: - # In some python/ssl builds the PROTOCOL_SSLv2 constant - # exists but SSLv2 support is still compiled out, which - # would result in an SSLError here (details vary depending - # on python version). The important thing is that - # SSLv2 request's don't succeed, so we can just ignore - # the errors here. - return - self.assertEqual(response.code, 599) - if ssl is None: del BaseSSLTest del SSLv23Test @@ -138,8 +112,6 @@ if getattr(ssl, 'OPENSSL_VERSION_INFO', (0, 0)) < (1, 0): # python 2.7 del SSLv3Test del TLSv1Test -if not hasattr(ssl, 'PROTOCOL_SSLv2'): - del SSLv2Test class MultipartTestHandler(RequestHandler):