123456789_123456789_123456789_123456789_123456789_

Class: Puma::MiniSSL::Context

Relationships & Source Files
Inherits: Object
Defined in: lib/puma/minissl.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

  • #check

    See additional method definition at line 197.

Constructor Details

.newContext

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 181

def initialize
  @no_tlsv1   = false
  @no_tlsv1_1 = false
end

Instance Attribute Details

#ca (rw)

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 205

attr_reader :ca

#ca=(ca) (rw)

Raises:

  • (ArgumentError)
[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 218

def ca=(ca)
  raise ArgumentError, "No such ca file '#{ca}'" unless File.exist? ca
  @ca = ca
end

#cert (rw)

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 204

attr_reader :cert

#cert=(cert) (rw)

Raises:

  • (ArgumentError)
[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 213

def cert=(cert)
  raise ArgumentError, "No such cert file '#{cert}'" unless File.exist? cert
  @cert = cert
end

#key (rw)

non-jruby Context properties

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 203

attr_reader :key

#key=(key) (rw)

Raises:

  • (ArgumentError)
[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 208

def key=(key)
  raise ArgumentError, "No such key file '#{key}'" unless File.exist? key
  @key = key
end

#keystore (rw)

jruby-specific Context properties: java uses a keystore and password pair rather than a cert/key pair

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 188

attr_reader :keystore

#keystore=(keystore) (rw)

Raises:

  • (ArgumentError)
[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 192

def keystore=(keystore)
  raise ArgumentError, "No such keystore file '#{keystore}'" unless File.exist? keystore
  @keystore = keystore
end

#keystore_pass (rw)

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 189

attr_accessor :keystore_pass

#no_tlsv1 (rw)

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 179

attr_reader :no_tlsv1, :no_tlsv1_1

#no_tlsv1=(tlsv1) (rw)

disables TLSv1

Raises:

  • (ArgumentError)
[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 230

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 179

attr_reader :no_tlsv1, :no_tlsv1_1

#no_tlsv1_1=(tlsv1_1) (rw)

disables TLSv1 and TLSv1.1. Overrides #no_tlsv1=

Raises:

  • (ArgumentError)
[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 236

def no_tlsv1_1=(tlsv1_1)
  raise ArgumentError, "Invalid value of no_tlsv1" 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 206

attr_accessor :ssl_cipher_filter

#ssl_cipher_list (rw)

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 190

attr_accessor :ssl_cipher_list

#verify_mode (rw)

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 178

attr_accessor :verify_mode

Instance Method Details

#check

See additional method definition at line 197.

[ GitHub ]

  
# File 'lib/puma/minissl.rb', line 223

def check
  raise "Keystore not configured" unless @keystore
end