Class: LetsCert::FullChainFile
- Inherits:
-
ChainFile
- Object
- IOPlugin
- OpenSSLIOPlugin
- ChainFile
- LetsCert::FullChainFile
- Defined in:
- lib/letscert/io_plugin.rb
Overview
Fullchain file plugin
Constant Summary
Constants inherited from OpenSSLIOPlugin
Constants inherited from IOPlugin
Instance Attribute Summary
Attributes inherited from IOPlugin
Instance Method Summary collapse
-
#load ⇒ Hash
Load full certificate chain.
-
#persisted ⇒ Hash
Always get
truefor:certand:chainkeys. -
#save(data) ⇒ void
Save fullchain.
Methods inherited from ChainFile
Methods included from FileIOPluginMixin
#load_from_content, #save_to_file
Methods inherited from OpenSSLIOPlugin
#dump_key, #initialize, #load_cert, #load_key
Methods inherited from IOPlugin
empty_data, #initialize, register, registered
Methods included from Loggable
Constructor Details
This class inherits a constructor from LetsCert::OpenSSLIOPlugin
Instance Method Details
#load ⇒ Hash
Load full certificate chain
323 324 325 326 327 328 329 330 331 332 |
# File 'lib/letscert/io_plugin.rb', line 323 def load data = super if data[:chain].nil? or data[:chain].empty? cert, chain = nil, nil else cert, chain = data[:chain] end { account_key: data[:account_key], key: data[:key], cert: cert, chain: chain } end |
#persisted ⇒ Hash
Returns always get true for :cert and :chain keys.
317 318 319 |
# File 'lib/letscert/io_plugin.rb', line 317 def persisted @persisted ||= { cert: true, chain: true } end |
#save(data) ⇒ void
This method returns an undefined value.
Save fullchain.
337 338 339 340 |
# File 'lib/letscert/io_plugin.rb', line 337 def save(data) super(account_key: data[:account_key], key: data[:key], cert: nil, chain: [data[:cert]] + data[:chain]) end |