```ruby
require 'net/http'

module NetHttpSslConnection
  refine Net::HTTP do
    def ssl_connection
      return {} unless @socket.present?
      { version: @socket.io.ssl_version, cipher: @socket.io.cipher[0] }
    end
  end
end
```

Check if using SSL before getting SSL conn info.
user
```ruby
require 'net/http'

module NetHttpSslConnection
  refine Net::HTTP do
    def ssl_connection
      return {} unless use_ssl? && @socket.present?
      { version: @socket.io.ssl_version, cipher: @socket.io.cipher[0] }
    end
  end
end
```
assistant