Class: Fluent::PluginHelper::HttpServer::Compat::SSLContextExtractor

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/plugin_helper/http_server/compat/ssl_context_extractor.rb

Overview

This class converts OpenSSL::SSL::SSLContext to Webrick SSL Config because webrick does not have interface to pass OpenSSL::SSL::SSLContext directory github.com/ruby/webrick/blob/v1.6.0/lib/webrick/ssl.rb#L67-L88

Class Method Summary collapse

Class Method Details

.extract(ctx) ⇒ Object

Parameters:

  • ctx (OpenSSL::SSL::SSLContext)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/fluent/plugin_helper/http_server/compat/ssl_context_extractor.rb', line 28

def self.extract(ctx)
  {
    SSLEnable: true,
    SSLPrivateKey: ctx.key,
    SSLCertificate: ctx.cert,
    SSLClientCA: ctx.client_ca,
    SSLExtraChainCert: ctx.extra_chain_cert,
    SSLCACertificateFile: ctx.ca_file,
    SSLCACertificatePath: ctx.ca_path,
    SSLCertificateStore: ctx.cert_store,
    SSLTmpDhCallback: ctx.tmp_dh_callback,
    SSLVerifyClient: ctx.verify_mode,
    SSLVerifyDepth: ctx.verify_depth,
    SSLVerifyCallback: ctx.verify_callback,
    SSLServerNameCallback: ctx.servername_cb,
    SSLTimeout: ctx.timeout,
    SSLOptions: ctx.options,
    SSLCiphers: ctx.ciphers,
  }
end