Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-74

Empty err message if hostname validation fails

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • 0.5
    • Affects Version/s: 0.5
    • Component/s: TLS/SSL, tornado
    • Labels:
      None

      When using Motor with Tornado, connected to MongoDB with SSL:

      ======================================================================
      FAIL: test_cert_ssl_validation_hostname_fail (test.test_motor_ssl.MotorSSLTest)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/Users/emptysquare/.virtualenvs/motor/lib/python2.7/site-packages/tornado/testing.py", line 120, in __call__
          result = self.orig_method(*args, **kwargs)
        File "/Users/emptysquare/.virtualenvs/motor/lib/python2.7/site-packages/tornado/testing.py", line 503, in post_coroutine
          timeout=timeout)
        File "/Users/emptysquare/.virtualenvs/motor/lib/python2.7/site-packages/tornado/ioloop.py", line 421, in run_sync
          return future_cell[0].result()
        File "/Users/emptysquare/.virtualenvs/motor/lib/python2.7/site-packages/tornado/concurrent.py", line 209, in result
          raise_exc_info(self._exc_info)
        File "/Users/emptysquare/.virtualenvs/motor/lib/python2.7/site-packages/tornado/gen.py", line 810, in run
          yielded = self.gen.throw(*sys.exc_info())
        File "/Users/emptysquare/.virtualenvs/motor/motor/test/test_motor_ssl.py", line 296, in test_cert_ssl_validation_hostname_fail
          str(exc))
      AssertionError: u"hostname 'localhost' doesn't match 'server'" != ''
      

      I think this is a result of my refactorings that added asyncio support. Before, the ConnectionFailure message was useful.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: