Class: Acme::Certificate
- Inherits:
-
Object
- Object
- Acme::Certificate
- Extended by:
- Forwardable
- Defined in:
- lib/acme/certificate.rb
Instance Attribute Summary collapse
-
#x509 ⇒ Object
readonly
Returns the value of attribute x509.
-
#x509_chain ⇒ Object
readonly
Returns the value of attribute x509_chain.
Instance Method Summary collapse
- #chain_to_pem ⇒ Object
- #fullchain_to_pem ⇒ Object
-
#initialize(certificate, chain) ⇒ Certificate
constructor
A new instance of Certificate.
Constructor Details
#initialize(certificate, chain) ⇒ Certificate
Returns a new instance of Certificate.
8 9 10 11 |
# File 'lib/acme/certificate.rb', line 8 def initialize(certificate, chain) @x509 = certificate @x509_chain = chain end |
Instance Attribute Details
#x509 ⇒ Object (readonly)
Returns the value of attribute x509.
4 5 6 |
# File 'lib/acme/certificate.rb', line 4 def x509 @x509 end |
#x509_chain ⇒ Object (readonly)
Returns the value of attribute x509_chain.
4 5 6 |
# File 'lib/acme/certificate.rb', line 4 def x509_chain @x509_chain end |
Instance Method Details
#chain_to_pem ⇒ Object
13 14 15 |
# File 'lib/acme/certificate.rb', line 13 def chain_to_pem x509_chain.map(&:to_pem).join end |
#fullchain_to_pem ⇒ Object
17 18 19 |
# File 'lib/acme/certificate.rb', line 17 def fullchain_to_pem [*x509_chain, x509].map(&:to_pem).join end |