Class: Hurley::SslOptions
- Inherits:
-
Struct
- Object
- Struct
- Hurley::SslOptions
- Defined in:
- lib/hurley/options.rb
Instance Attribute Summary collapse
-
#ca_file ⇒ Object
Returns the value of attribute ca_file.
-
#ca_path ⇒ Object
Returns the value of attribute ca_path.
-
#client_cert ⇒ Object
Returns the value of attribute client_cert.
-
#client_cert_path ⇒ Object
Returns the value of attribute client_cert_path.
-
#openssl_cert_store ⇒ Object
Returns the value of attribute openssl_cert_store.
-
#openssl_client_cert ⇒ Object
Returns the value of attribute openssl_client_cert.
-
#openssl_client_key ⇒ Object
Returns the value of attribute openssl_client_key.
-
#private_key ⇒ Object
Returns the value of attribute private_key.
-
#private_key_pass ⇒ Object
Returns the value of attribute private_key_pass.
-
#private_key_path ⇒ Object
Returns the value of attribute private_key_path.
-
#skip_verification ⇒ Object
Returns the value of attribute skip_verification.
-
#verify_depth ⇒ Object
Returns the value of attribute verify_depth.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
Instance Attribute Details
#ca_file ⇒ Object
Returns the value of attribute ca_file
60 61 62 |
# File 'lib/hurley/options.rb', line 60 def ca_file @ca_file end |
#ca_path ⇒ Object
Returns the value of attribute ca_path
60 61 62 |
# File 'lib/hurley/options.rb', line 60 def ca_path @ca_path end |
#client_cert ⇒ Object
Returns the value of attribute client_cert
60 61 62 |
# File 'lib/hurley/options.rb', line 60 def client_cert @client_cert end |
#client_cert_path ⇒ Object
Returns the value of attribute client_cert_path
60 61 62 |
# File 'lib/hurley/options.rb', line 60 def client_cert_path @client_cert_path end |
#openssl_cert_store ⇒ Object
Returns the value of attribute openssl_cert_store
60 61 62 |
# File 'lib/hurley/options.rb', line 60 def openssl_cert_store @openssl_cert_store end |
#openssl_client_cert ⇒ Object
Returns the value of attribute openssl_client_cert
60 61 62 |
# File 'lib/hurley/options.rb', line 60 def openssl_client_cert @openssl_client_cert end |
#openssl_client_key ⇒ Object
Returns the value of attribute openssl_client_key
60 61 62 |
# File 'lib/hurley/options.rb', line 60 def openssl_client_key @openssl_client_key end |
#private_key ⇒ Object
Returns the value of attribute private_key
60 61 62 |
# File 'lib/hurley/options.rb', line 60 def private_key @private_key end |
#private_key_pass ⇒ Object
Returns the value of attribute private_key_pass
60 61 62 |
# File 'lib/hurley/options.rb', line 60 def private_key_pass @private_key_pass end |
#private_key_path ⇒ Object
Returns the value of attribute private_key_path
60 61 62 |
# File 'lib/hurley/options.rb', line 60 def private_key_path @private_key_path end |
#skip_verification ⇒ Object
Returns the value of attribute skip_verification
60 61 62 |
# File 'lib/hurley/options.rb', line 60 def skip_verification @skip_verification end |
#verify_depth ⇒ Object
Returns the value of attribute verify_depth
60 61 62 |
# File 'lib/hurley/options.rb', line 60 def verify_depth @verify_depth end |
#version ⇒ Object
Returns the value of attribute version
60 61 62 |
# File 'lib/hurley/options.rb', line 60 def version @version end |
Instance Method Details
#openssl_private_key ⇒ Object
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/hurley/options.rb', line 124 def openssl_private_key @openssl_private_key ||= begin pkey = if pkey_path = self[:private_key_path] File.read(pkey_path) else self[:private_key] end return unless pkey if OpenSSL::PKey.respond_to?(:read) OpenSSL::PKey.read(pkey, self[:private_key_pass]) else OpenSSL::PKey::RSA.new(pkey, self[:private_key_pass]) end end end |
#openssl_verify_mode ⇒ Object
106 107 108 |
# File 'lib/hurley/options.rb', line 106 def openssl_verify_mode skip_verification ? OpenSSL::SSL::VERIFY_NONE : OpenSSL::SSL::VERIFY_PEER end |
#skip_verification? ⇒ Boolean
102 103 104 |
# File 'lib/hurley/options.rb', line 102 def skip_verification? self[:skip_verification] end |