Skip to content

Instantly share code, notes, and snippets.

@sauloperez
Created February 4, 2014 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sauloperez/8800408 to your computer and use it in GitHub Desktop.
Save sauloperez/8800408 to your computer and use it in GitHub Desktop.
Test HTTPS connection from Ruby
#!/usr/bin/env ruby
# Usage: $ https <host> [path]
require 'net/https'
h = Net::HTTP.new(ARGV[0], 443)
h.use_ssl = true
h.ssl_version = :SSLv3
h.verify_mode = OpenSSL::SSL::VERIFY_PEER
h.get '#{ARGV[1]}'
puts "Fine!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment