Last active
August 29, 2015 14:04
-
-
Save mrjman/30bed4495c50e20d9e5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "net/http" | |
require "openssl" | |
cert_store = OpenSSL::X509::Store.new | |
cert_store.add_file 'certs/AddTrustExternalCARoot.crt' | |
cert_store.add_file 'certs/COMODORSAAddTrustCA.crt' | |
http = Net::HTTP.new('ume.michaeljfox.org', 8097) | |
#http = Net::HTTP.new('173.193.29.12', 11121) | |
http.use_ssl = true | |
# Set cert store to use default system paths | |
#http.cert_store = OpenSSL::X509::Store.new | |
#http.cert_store.set_default_paths | |
# use explicit cert store with certs added manually | |
http.cert_store = cert_store | |
http.verify_mode = OpenSSL::SSL::VERIFY_PEER | |
http.get('/') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment