Class: Faraday::SSLOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/faraday/options/ssl_options.rb

Overview

SSL-related options.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ca_fileString

Returns CA file.

Returns:

  • (String)

    CA file


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/faraday/options/ssl_options.rb', line 44

class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode,
                               :cert_store, :client_cert, :client_key,
                               :certificate, :private_key, :verify_depth,
                               :version, :min_version, :max_version)

  # @return [Boolean] true if should verify
  def verify?
    verify != false
  end

  # @return [Boolean] true if should not verify
  def disable?
    !verify?
  end
end

#ca_pathString

Returns CA path.

Returns:

  • (String)

    CA path


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/faraday/options/ssl_options.rb', line 44

class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode,
                               :cert_store, :client_cert, :client_key,
                               :certificate, :private_key, :verify_depth,
                               :version, :min_version, :max_version)

  # @return [Boolean] true if should verify
  def verify?
    verify != false
  end

  # @return [Boolean] true if should not verify
  def disable?
    !verify?
  end
end

#cert_storeOpenSSL::X509::Store

Returns certificate store.

Returns:

  • (OpenSSL::X509::Store)

    certificate store


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/faraday/options/ssl_options.rb', line 44

class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode,
                               :cert_store, :client_cert, :client_key,
                               :certificate, :private_key, :verify_depth,
                               :version, :min_version, :max_version)

  # @return [Boolean] true if should verify
  def verify?
    verify != false
  end

  # @return [Boolean] true if should not verify
  def disable?
    !verify?
  end
end

#certificateOpenSSL::X509::Certificate

Returns certificate (Excon only).

Returns:

  • (OpenSSL::X509::Certificate)

    certificate (Excon only)


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/faraday/options/ssl_options.rb', line 44

class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode,
                               :cert_store, :client_cert, :client_key,
                               :certificate, :private_key, :verify_depth,
                               :version, :min_version, :max_version)

  # @return [Boolean] true if should verify
  def verify?
    verify != false
  end

  # @return [Boolean] true if should not verify
  def disable?
    !verify?
  end
end

#client_certString, OpenSSL::X509::Certificate

Returns client certificate.

Returns:

  • (String, OpenSSL::X509::Certificate)

    client certificate


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/faraday/options/ssl_options.rb', line 44

class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode,
                               :cert_store, :client_cert, :client_key,
                               :certificate, :private_key, :verify_depth,
                               :version, :min_version, :max_version)

  # @return [Boolean] true if should verify
  def verify?
    verify != false
  end

  # @return [Boolean] true if should not verify
  def disable?
    !verify?
  end
end

#client_keyString, ...

Returns client key.

Returns:

  • (String, OpenSSL::PKey::RSA, OpenSSL::PKey::DSA)

    client key


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/faraday/options/ssl_options.rb', line 44

class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode,
                               :cert_store, :client_cert, :client_key,
                               :certificate, :private_key, :verify_depth,
                               :version, :min_version, :max_version)

  # @return [Boolean] true if should verify
  def verify?
    verify != false
  end

  # @return [Boolean] true if should not verify
  def disable?
    !verify?
  end
end

#max_versionString, Symbol


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/faraday/options/ssl_options.rb', line 44

class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode,
                               :cert_store, :client_cert, :client_key,
                               :certificate, :private_key, :verify_depth,
                               :version, :min_version, :max_version)

  # @return [Boolean] true if should verify
  def verify?
    verify != false
  end

  # @return [Boolean] true if should not verify
  def disable?
    !verify?
  end
end

#min_versionString, Symbol


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/faraday/options/ssl_options.rb', line 44

class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode,
                               :cert_store, :client_cert, :client_key,
                               :certificate, :private_key, :verify_depth,
                               :version, :min_version, :max_version)

  # @return [Boolean] true if should verify
  def verify?
    verify != false
  end

  # @return [Boolean] true if should not verify
  def disable?
    !verify?
  end
end

#private_keyOpenSSL::PKey::RSA, OpenSSL::PKey::DSA

Returns private key (Excon only).

Returns:

  • (OpenSSL::PKey::RSA, OpenSSL::PKey::DSA)

    private key (Excon only)


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/faraday/options/ssl_options.rb', line 44

class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode,
                               :cert_store, :client_cert, :client_key,
                               :certificate, :private_key, :verify_depth,
                               :version, :min_version, :max_version)

  # @return [Boolean] true if should verify
  def verify?
    verify != false
  end

  # @return [Boolean] true if should not verify
  def disable?
    !verify?
  end
end

#verifyBoolean

Returns whether to verify SSL certificates or not.

Returns:

  • (Boolean)

    whether to verify SSL certificates or not


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/faraday/options/ssl_options.rb', line 44

class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode,
                               :cert_store, :client_cert, :client_key,
                               :certificate, :private_key, :verify_depth,
                               :version, :min_version, :max_version)

  # @return [Boolean] true if should verify
  def verify?
    verify != false
  end

  # @return [Boolean] true if should not verify
  def disable?
    !verify?
  end
end

#verify_depthInteger

Returns maximum depth for the certificate chain verification.

Returns:

  • (Integer)

    maximum depth for the certificate chain verification


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/faraday/options/ssl_options.rb', line 44

class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode,
                               :cert_store, :client_cert, :client_key,
                               :certificate, :private_key, :verify_depth,
                               :version, :min_version, :max_version)

  # @return [Boolean] true if should verify
  def verify?
    verify != false
  end

  # @return [Boolean] true if should not verify
  def disable?
    !verify?
  end
end

#verify_modeInteger

Returns:


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/faraday/options/ssl_options.rb', line 44

class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode,
                               :cert_store, :client_cert, :client_key,
                               :certificate, :private_key, :verify_depth,
                               :version, :min_version, :max_version)

  # @return [Boolean] true if should verify
  def verify?
    verify != false
  end

  # @return [Boolean] true if should not verify
  def disable?
    !verify?
  end
end

#versionString, Symbol


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/faraday/options/ssl_options.rb', line 44

class SSLOptions < Options.new(:verify, :ca_file, :ca_path, :verify_mode,
                               :cert_store, :client_cert, :client_key,
                               :certificate, :private_key, :verify_depth,
                               :version, :min_version, :max_version)

  # @return [Boolean] true if should verify
  def verify?
    verify != false
  end

  # @return [Boolean] true if should not verify
  def disable?
    !verify?
  end
end

Instance Method Details

#disable?Boolean

Returns true if should not verify.

Returns:

  • (Boolean)

    true if should not verify


55
56
57
# File 'lib/faraday/options/ssl_options.rb', line 55

def disable?
  !verify?
end

#verify?Boolean

Returns true if should verify.

Returns:

  • (Boolean)

    true if should verify


50
51
52
# File 'lib/faraday/options/ssl_options.rb', line 50

def verify?
  verify != false
end