+if ssl
+ certificate = ssl.peer_cert
+
+ if Time.now < certificate.not_before
+ puts "Certificate #{domains.first} on #{host} not valid until #{certificate.not_before}"
+ elsif certificate.not_after - Time.now < 21 * 86400
+ puts "Certificate #{domains.first} on #{host} expires at #{certificate.not_after}"
+ end