Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.
//de edited this page Dec 12, 2013 · 6 revisions

See also: Reel::Server::SSL Yardoc

Reel supports Transport Layer Encryption (TLS) via Ruby's OpenSSL binding on MRI/Rubinius and the jruby-openssl gem on JRuby (which is based on BouncyCastle)

The Reel::SSLServer class provides an HTTPS-enabled version of the Reel::Server class, with largely the same API but a few different options:

require 'reel'

ssl_options = {
  :cert => File.read("server.crt")
  :key  => File.read("server.key")
}

Reel::Server::SSL.run("127.0.0.1", 3000, ssl_options) do |connection|
  connection.each_request do |request|
    request.respond :ok, "hello, world!"
  end
end

SSL Options

The following options are currently supported:

  • :cert: (String) the SSL certificate for this particular server. This file also needs to contain any intermediate certs needed to reach a trust root concatenated together with it.
  • :key: (String) the SSL private key associated with the above SSL certificate.

Validating HTTPS client certs (Mutual Authentication)

Reel does not presently support validation of HTTPS client certificates. If you'd like support for this swing by issue #94: HTTPS client certificate validation.

Clone this wiki locally