Class: Puma::MiniSSL::Context
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/puma/minissl.rb |
Class Method Summary
- .new ⇒ Context constructor
Instance Attribute Summary
- #ca rw
- #ca=(ca) rw
- #cert rw
- #cert=(cert) rw
- #cert_pem rw
- #cert_pem=(cert_pem) rw
-
#key
rw
non-jruby
Context
properties. - #key=(key) rw
- #key_pem rw
- #key_pem=(key_pem) rw
-
#keystore
rw
jruby-specific
Context
properties: java uses a keystore and password pair rather than a cert/key pair. - #keystore=(keystore) rw
- #keystore_pass rw
- #no_tlsv1 rw
-
#no_tlsv1=(tlsv1)
rw
disables TLSv1.
- #no_tlsv1_1 rw
-
#no_tlsv1_1=(tlsv1_1)
rw
disables TLSv1 and
TLSv1.1
. - #ssl_cipher_filter rw
- #ssl_cipher_list rw
- #verification_flags rw
- #verify_mode rw
Instance Method Summary
-
#check
See additional method definition at line 233.
- #check_file(file, desc)
Constructor Details
.new ⇒ Context
# File 'lib/puma/minissl.rb', line 208
def initialize @no_tlsv1 = false @no_tlsv1_1 = false @key = nil @cert = nil @key_pem = nil @cert_pem = nil end
Instance Attribute Details
#ca (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 241
attr_reader :ca
#ca=(ca) (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 257
def ca=(ca) check_file ca, 'ca' @ca = ca end
#cert (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 240
attr_reader :cert
#cert=(cert) (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 252
def cert=(cert) check_file cert, 'Cert' @cert = cert end
#cert_pem (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 242
attr_reader :cert_pem
#cert_pem=(cert_pem) (rw)
#key (rw)
non-jruby Context
properties
# File 'lib/puma/minissl.rb', line 239
attr_reader :key
#key=(key) (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 247
def key=(key) check_file key, 'Key' @key = key end
#key_pem (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 243
attr_reader :key_pem
#key_pem=(key_pem) (rw)
#keystore (rw)
jruby-specific Context
properties: java uses a keystore and password pair rather than a cert/key pair
# File 'lib/puma/minissl.rb', line 224
attr_reader :keystore
#keystore=(keystore) (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 228
def keystore=(keystore) check_file keystore, 'Keystore' @keystore = keystore end
#keystore_pass (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 225
attr_accessor :keystore_pass
#no_tlsv1 (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 206
attr_reader :no_tlsv1, :no_tlsv1_1
#no_tlsv1=(tlsv1) (rw)
disables TLSv1
# File 'lib/puma/minissl.rb', line 280
def no_tlsv1=(tlsv1) raise ArgumentError, "Invalid value of no_tlsv1=" unless ['true', 'false', true, false].include?(tlsv1) @no_tlsv1 = tlsv1 end
#no_tlsv1_1 (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 206
attr_reader :no_tlsv1, :no_tlsv1_1
#no_tlsv1_1=(tlsv1_1) (rw)
disables TLSv1 and TLSv1.1
. Overrides #no_tlsv1=
# File 'lib/puma/minissl.rb', line 287
def no_tlsv1_1=(tlsv1_1) raise ArgumentError, "Invalid value of no_tlsv1_1=" unless ['true', 'false', true, false].include?(tlsv1_1) @no_tlsv1_1 = tlsv1_1 end
#ssl_cipher_filter (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 244
attr_accessor :ssl_cipher_filter
#ssl_cipher_list (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 226
attr_accessor :ssl_cipher_list
#verification_flags (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 245
attr_accessor :verification_flags
#verify_mode (rw)
[ GitHub ]# File 'lib/puma/minissl.rb', line 205
attr_accessor :verify_mode
Instance Method Details
#check
See additional method definition at line 233.
# File 'lib/puma/minissl.rb', line 272
def check raise "Keystore not configured" unless @keystore end
#check_file(file, desc)
# File 'lib/puma/minissl.rb', line 217
def check_file(file, desc) raise ArgumentError, "#{desc} file '#{file}' does not exist" unless File.exist? file raise ArgumentError, "#{desc} file '#{file}' is not readable" unless File.readable? file end