Class: Ritm::Proxy::CertSigningHTTPSServer

Inherits:
WEBrick::HTTPServer show all
Defined in:
lib/ritm/proxy/cert_signing_https_server.rb

Overview

Patches WEBrick::HTTPServer SSL context creation to get a callback on the ‘Client Helo’ step of the SSL-Handshake if SNI is specified So RitM can create self-signed certificates on the fly

Instance Method Summary collapse

Methods inherited from WEBrick::HTTPServer

#do_DELETE, #do_OPTIONS, #do_PATCH, #do_PUT

Instance Method Details

#setup_ssl_context(config) ⇒ Object

Override



15
16
17
18
19
# File 'lib/ritm/proxy/cert_signing_https_server.rb', line 15

def setup_ssl_context(config)
  ctx = super(config)
  prepare_sni_callback(ctx, config[:ca])
  ctx
end