Skip to content

Instantly share code, notes, and snippets.

@tomrossi7
Created May 4, 2015 17:47
Show Gist options
  • Save tomrossi7/3c8d564fedfd22249b3c to your computer and use it in GitHub Desktop.
Save tomrossi7/3c8d564fedfd22249b3c to your computer and use it in GitHub Desktop.
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.cert = OpenSSL::X509::Certificate.new(File.read("lib/surescripts/demo.streamcare.cer"))
http.ca_file = 'lib/surescripts/surescripts_root.cer'
http.ciphers = ['AES256-SHA256']
ctx = OpenSSL::SSL::SSLContext.new
ctx.ssl_version = :TLSv1_2
request = Net::HTTP::Post.new(uri.request_uri)
request.body = builder.to_xml
response = http.request(request)
# Still errors with OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read finished A: sslv3 alert handshake failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment