Ruby driver returns generic OpenSSL error message rather than the actual one

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 2.6.1
    • Affects Version/s: 2.6.0
    • Component/s: Auth
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The Ruby driver catches all OpenSSL-related errors and returns the generic "SSL handshake failed. MongoDB may not be configured with SSL support.". The actual error is discarded making debugging difficult.

      https://github.com/mongodb/mongo-ruby-driver/blob/master/lib/mongo/socket.rb#L288-L290

      We should pass back the inner error message so that it can be logged in a manner similar to the following:

      rescue OpenSSL::SSL::SSLError => e
        raise Mongo::Error::SocketError, "#{Mongo::Socket::SSL::SSL_ERROR} (#{e.message})"
      end
      

              Assignee:
              Oleg Pudeyev (Inactive)
              Reporter:
              James Kovacs
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: