Class: LetsencryptPlugin::CertificateOutput

Inherits:
Object
  • Object
show all
Defined in:
lib/letsencrypt_plugin/certificate_output.rb

Direct Known Subclasses

FileOutput, HerokuOutput

Instance Method Summary collapse

Constructor Details

#initialize(domain, cert) ⇒ CertificateOutput

Returns a new instance of CertificateOutput.



3
4
5
6
# File 'lib/letsencrypt_plugin/certificate_output.rb', line 3

def initialize(domain, cert)
  @certificate = cert
  @domain = domain
end

Instance Method Details

#outputObject



8
9
10
11
12
13
14
15
# File 'lib/letsencrypt_plugin/certificate_output.rb', line 8

def output
  display_info

  output_cert('cert.pem', @certificate.to_pem)
  output_cert('key.pem', @certificate.request.private_key.to_pem)
  output_cert('chain.pem', @certificate.chain_to_pem)
  output_cert('fullchain.pem', @certificate.fullchain_to_pem)
end