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