Sha256: 385b9cdb5a9297665970bb314791ad9bb43837c061aa01b910d4f92e1a99dfab

Contents?: true

Size: 405 Bytes

Versions: 8

Compression:

Stored size: 405 Bytes

Contents

module Thin
  module Backends
    class Base
      attr_accessor :ca_cert
    end
  end

  class Connection < EventMachine::Connection
    def ssl_verify_peer cert
      client = OpenSSL::X509::Certificate.new cert
      store.verify client
    end


    private
    def store
       @store ||= OpenSSL::X509::Store.new.tap do |store|
         store.add_file backend.ca_cert
       end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
grenache-ruby-http-0.2.21 lib/grenache/http/http_server.rb
grenache-ruby-http-0.2.20 lib/grenache/http/http_server.rb
grenache-ruby-http-0.2.19 lib/grenache/http/http_server.rb
grenache-ruby-http-0.2.18 lib/grenache/http/http_server.rb
grenache-ruby-http-0.2.17 lib/grenache/http/http_server.rb
grenache-ruby-http-0.2.16 lib/grenache/http/http_server.rb
grenache-ruby-http-0.2.15 lib/grenache/http/http_server.rb
grenache-ruby-http-0.2.14 lib/grenache/http/http_server.rb