method
apply_ssl_options
Ruby on Rails latest stable (v7.1.3.2)
-
0 notes -
Class: ActiveResource::Connection
- 1.0.0
- 1.1.6
- 1.2.6
- 2.0.3
- 2.1.0
- 2.2.1
- 2.3.8 (0)
- 3.0.0 (0)
- 3.0.9 (0)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- 4.0.2
- 4.1.8
- 4.2.1
- 4.2.7
- 4.2.9
- 5.0.0.1
- 5.1.7
- 5.2.3
- 6.0.0
- 6.1.3.1
- 6.1.7.7
- 7.0.0
- 7.1.3.2
- 7.1.3.4
- What's this?
apply_ssl_options(http)
private
Hide source
# File activeresource/lib/active_resource/connection.rb, line 180 def apply_ssl_options(http) return http unless @site.is_a?(URI::HTTPS) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE return http unless defined?(@ssl_options) http.ca_path = @ssl_options[:ca_path] if @ssl_options[:ca_path] http.ca_file = @ssl_options[:ca_file] if @ssl_options[:ca_file] http.cert = @ssl_options[:cert] if @ssl_options[:cert] http.key = @ssl_options[:key] if @ssl_options[:key] http.cert_store = @ssl_options[:cert_store] if @ssl_options[:cert_store] http.ssl_timeout = @ssl_options[:ssl_timeout] if @ssl_options[:ssl_timeout] http.verify_mode = @ssl_options[:verify_mode] if @ssl_options[:verify_mode] http.verify_callback = @ssl_options[:verify_callback] if @ssl_options[:verify_callback] http.verify_depth = @ssl_options[:verify_depth] if @ssl_options[:verify_depth] http end