From: yermej Date: 2009-09-04T08:35:08+09:00 Subject: Re: How do I decode/parse a X509 SSL Cert On Sep 3, 3:43 pm, marc spitzer wrote: > Hi, > > Did a bit of googleing on this and did not have much luck. > I would like to connect to a ssl webserver and download the > cert.  Then I would like to decode the cert and pares out some > fields of interest, host name and expire date, and make it a > report that gets mailed out weekly.   > > My question is what would be the best way to get and decode the > cert? require 'openssl' cert = OpenSSL::X509::Certificate.new(File.read(cert_file_name)) cert.subject cert.not_after