def configure(cert)
      cert.version = 2
      cert.serial = serial
      cert.subject = OpenSSL::X509::Name.parse(name)
      cert.issuer = cert.subject
      cert.public_key = key.public_key
      cert.not_before = days_ago(2)
      cert.not_after = days_from_now(2)
    end
def configure(cert)
      cert.version = 2
      cert.serial = serial
      cert.subject = OpenSSL::X509::Name.parse(name)
      cert.issuer = cert.subject
      cert.public_key = key.public_key
      cert.not_before = days_ago(2)
      cert.not_after = days_from_now(2)
    end
Setup all relevant properties of the given certificate to produce
 a valid and useable certificate.