]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Get rid of test_sslv2_fail.
authorBen Darnell <ben@bendarnell.com>
Mon, 18 Jun 2012 06:04:56 +0000 (23:04 -0700)
committerBen Darnell <ben@bendarnell.com>
Mon, 18 Jun 2012 06:07:39 +0000 (23:07 -0700)
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.

.travis.yml
tornado/test/httpserver_test.py

index 525033dca569b4f66e1c5d7af8bfb15a8fedc2fb..88837e45e352dd303285835ac989e5b11a7e5eeb 100644 (file)
@@ -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
index 6503965cb33e8d10f4bd8ca6235d7ee2feff6500..5237e75e46e816d62120830b05d4f5a73c69cc20 100644 (file)
@@ -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):