negativecode / vines

An XMPP chat server for Ruby.
http://www.getvines.org/
MIT License
471 stars 75 forks source link

ssl_verify_peer does close the connection also for outbound connections #2

Open ibc opened 12 years ago

ibc commented 12 years ago

In lib/vines/stream.rb#L94 it is writen:

    def ssl_verify_peer(pem)
      # EM is supposed to close the connection when this returns false,
      # but it only does that for inbound connections, not when we
      # make a connection to another server.
      @store.trusted?(pem).tap do |trusted|
        close_connection unless trusted
      end
    end

Fortunatelly that is an already fixed bug (in EM master branch). Take a look to this report:

I also recommend you to check this bug I've found using EM with TLS:

And I've not tested this one: