@agent = Mechanize.new
@agent.user_agent_alias = 'Linux Mozilla'
@agent.redirect_ok = true
@agent.read_timeout = 60
@agent.ssl_version = 'SSLv3'
cert = OpenSSL::PKCS12.new(File.open('my_pfx.pfx'), 'password')
@agent.cert = cert.certificate
@agent.key = cert.key
f = File.open('ca.crt', 'w')
f.write(cert.ca_certs.map(&:to_s).join)
f.close
@agent.ca_file = f.path
Created
May 20, 2016 10:47
-
-
Save evg2108/08636f309d3e3549c79d0877f57f20ed to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment