Skip to content

Instantly share code, notes, and snippets.

@sawanoboly
Created July 18, 2012 01:26
Show Gist options
  • Save sawanoboly/3133458 to your computer and use it in GitHub Desktop.
Save sawanoboly/3133458 to your computer and use it in GitHub Desktop.
get cert not_after via net/https.
require 'net/https'
https = Net::HTTP.new('google.com',443)
https.use_ssl = true
https.verify_mode = OpenSSL::SSL::VERIFY_NONE
https.start {
puts https.peer_cert.not_after.class
puts https.peer_cert.not_after
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment