Skip to content

Instantly share code, notes, and snippets.

@rjaus
Created February 14, 2018 00:16
Show Gist options
  • Save rjaus/dbeaea36481fdc47d05d7662910ac297 to your computer and use it in GitHub Desktop.
Save rjaus/dbeaea36481fdc47d05d7662910ac297 to your computer and use it in GitHub Desktop.
Find out which TLS version your ruby install supports, utilising: https://www.howsmyssl.com/s/api.html
require "net/http"
require "uri"
require "json"
uri = URI.parse("https://www.howsmyssl.com/a/check")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
resp = JSON.parse(http.request(Net::HTTP::Get.new(uri.request_uri)).body)
puts JSON.pretty_generate(resp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment