Class: LetsCert::KeyFile
- Inherits:
-
OpenSSLIOPlugin
- Object
- IOPlugin
- OpenSSLIOPlugin
- LetsCert::KeyFile
- Includes:
- FileIOPluginMixin
- Defined in:
- lib/letscert/io_plugins/key_file.rb
Overview
Key file plugin
Constant Summary
Constants inherited from OpenSSLIOPlugin
Instance Attribute Summary
Attributes inherited from IOPlugin
Instance Method Summary collapse
- #load_from_content(content) ⇒ Hash
-
#persisted ⇒ Hash
Always get
true
for:key
key. -
#save(data) ⇒ void
Save private key.
Methods included from FileIOPluginMixin
Methods inherited from OpenSSLIOPlugin
#dump_key, #initialize, #load_cert, #load_key
Methods inherited from IOPlugin
empty_data, #initialize, #load, register
Methods included from Loggable
Constructor Details
This class inherits a constructor from LetsCert::OpenSSLIOPlugin
Instance Method Details
#load_from_content(content) ⇒ Hash
35 36 37 |
# File 'lib/letscert/io_plugins/key_file.rb', line 35 def load_from_content(content) { key: load_key(content) } end |
#persisted ⇒ Hash
Returns always get true
for :key
key.
30 31 32 |
# File 'lib/letscert/io_plugins/key_file.rb', line 30 def persisted @persisted ||= { key: true } end |
#save(data) ⇒ void
This method returns an undefined value.
Save private key.
42 43 44 |
# File 'lib/letscert/io_plugins/key_file.rb', line 42 def save(data) save_to_file(dump_key(data[:key])) end |