def add_extensions(cert)
      factory = OpenSSL::X509::ExtensionFactory.new
      factory.issuer_certificate = Billy.certificate_authority.cert
      factory.subject_certificate = cert
      extensions.each do |ln_sn, value, critical|
        cert.add_extension(factory.create_extension(ln_sn, value, critical))
      end
    end
def add_extensions(cert)
      factory = OpenSSL::X509::ExtensionFactory.new
      factory.issuer_certificate = Billy.certificate_authority.cert
      factory.subject_certificate = cert
      extensions.each do |ln_sn, value, critical|
        cert.add_extension(factory.create_extension(ln_sn, value, critical))
      end
    end
Add all extensions (defined by the +extensions+ method) to the given
 certificate.