# File lib/mechanize/chain/ssl_resolver.rb, line 14 14: def handle(ctx, params) 15: uri = params[:uri] 16: http_obj = params[:connection] 17: 18: ssl = nil 19: if http_obj.instance_variable_defined?(:@ssl_context) 20: ssl = http_obj.instance_variable_get(:@ssl_context) 21: end 22: 23: if uri.scheme == 'https' && ! http_obj.started? && (ssl.nil? || ! ssl.frozen?) 24: http_obj.use_ssl = true 25: http_obj.verify_mode = OpenSSL::SSL::VERIFY_NONE 26: if @ca_file 27: http_obj.ca_file = @ca_file 28: http_obj.verify_mode = OpenSSL::SSL::VERIFY_PEER 29: http_obj.verify_callback = @verify_callback if @verify_callback 30: end 31: if @cert && @key 32: http_obj.cert = OpenSSL::X509::Certificate.new(::File.read(@cert)) 33: http_obj.key = OpenSSL::PKey::RSA.new(::File.read(@key), @pass) 34: end 35: end 36: super 37: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.