Class: Puma::MiniSSL::Context
- Inherits:
-
Object
- Object
- Puma::MiniSSL::Context
- Defined in:
- lib/puma/minissl.rb
Instance Attribute Summary collapse
-
#ca ⇒ Object
Returns the value of attribute ca.
-
#cert ⇒ Object
Returns the value of attribute cert.
-
#cert_pem ⇒ Object
Returns the value of attribute cert_pem.
-
#key ⇒ Object
non-jruby Context properties.
-
#key_pem ⇒ Object
Returns the value of attribute key_pem.
-
#keystore ⇒ Object
jruby-specific Context properties: java uses a keystore and password pair rather than a cert/key pair.
-
#keystore_pass ⇒ Object
Returns the value of attribute keystore_pass.
-
#no_tlsv1 ⇒ Object
Returns the value of attribute no_tlsv1.
-
#no_tlsv1== ⇒ Object
writeonly
disables TLSv1.
-
#no_tlsv1_1 ⇒ Object
Returns the value of attribute no_tlsv1_1.
-
#no_tlsv1_1== ⇒ Object
writeonly
disables TLSv1 and TLSv1.1.
-
#ssl_cipher_filter ⇒ Object
Returns the value of attribute ssl_cipher_filter.
-
#ssl_cipher_list ⇒ Object
Returns the value of attribute ssl_cipher_list.
-
#verification_flags ⇒ Object
Returns the value of attribute verification_flags.
-
#verify_mode ⇒ Object
Returns the value of attribute verify_mode.
Instance Method Summary collapse
- #check ⇒ Object
- #check_file(file, desc) ⇒ Object
-
#initialize ⇒ Context
constructor
A new instance of Context.
Constructor Details
#initialize ⇒ Context
Returns a new instance of Context.
208 209 210 211 212 213 214 215 |
# 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 ⇒ Object
Returns the value of attribute ca.
241 242 243 |
# File 'lib/puma/minissl.rb', line 241 def ca @ca end |
#cert ⇒ Object
Returns the value of attribute cert.
240 241 242 |
# File 'lib/puma/minissl.rb', line 240 def cert @cert end |
#cert_pem ⇒ Object
Returns the value of attribute cert_pem.
242 243 244 |
# File 'lib/puma/minissl.rb', line 242 def cert_pem @cert_pem end |
#key ⇒ Object
non-jruby Context properties
239 240 241 |
# File 'lib/puma/minissl.rb', line 239 def key @key end |
#key_pem ⇒ Object
Returns the value of attribute key_pem.
243 244 245 |
# File 'lib/puma/minissl.rb', line 243 def key_pem @key_pem end |
#keystore ⇒ Object
jruby-specific Context properties: java uses a keystore and password pair rather than a cert/key pair
224 225 226 |
# File 'lib/puma/minissl.rb', line 224 def keystore @keystore end |
#keystore_pass ⇒ Object
Returns the value of attribute keystore_pass.
225 226 227 |
# File 'lib/puma/minissl.rb', line 225 def keystore_pass @keystore_pass end |
#no_tlsv1 ⇒ Object
Returns the value of attribute no_tlsv1.
206 207 208 |
# File 'lib/puma/minissl.rb', line 206 def no_tlsv1 @no_tlsv1 end |
#no_tlsv1==(value) ⇒ Object (writeonly)
disables TLSv1
280 281 282 283 |
# 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 ⇒ Object
Returns the value of attribute no_tlsv1_1.
206 207 208 |
# File 'lib/puma/minissl.rb', line 206 def no_tlsv1_1 @no_tlsv1_1 end |
#no_tlsv1_1==(value) ⇒ Object (writeonly)
disables TLSv1 and TLSv1.1. Overrides `#no_tlsv1=`
287 288 289 290 |
# 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 ⇒ Object
Returns the value of attribute ssl_cipher_filter.
244 245 246 |
# File 'lib/puma/minissl.rb', line 244 def ssl_cipher_filter @ssl_cipher_filter end |
#ssl_cipher_list ⇒ Object
Returns the value of attribute ssl_cipher_list.
226 227 228 |
# File 'lib/puma/minissl.rb', line 226 def ssl_cipher_list @ssl_cipher_list end |
#verification_flags ⇒ Object
Returns the value of attribute verification_flags.
245 246 247 |
# File 'lib/puma/minissl.rb', line 245 def verification_flags @verification_flags end |
#verify_mode ⇒ Object
Returns the value of attribute verify_mode.
205 206 207 |
# File 'lib/puma/minissl.rb', line 205 def verify_mode @verify_mode end |
Instance Method Details
#check ⇒ Object
233 234 235 |
# File 'lib/puma/minissl.rb', line 233 def check raise "Keystore not configured" unless @keystore end |
#check_file(file, desc) ⇒ Object
217 218 219 220 |
# 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 |