Class: Net::SSH::KeyFactory::OpenSSLKeyTypeBase
- Defined in:
- lib/net/ssh/key_factory.rb
Direct Known Subclasses
OpenSSLDSAKeyType, OpenSSLECKeyType, OpenSSLPKeyType, OpenSSLRSAKeyType
Class Method Summary collapse
- .encrypted_key?(key_data, error) ⇒ Boolean
- .open_ssl_class ⇒ Object
-
.read(key_data, passphrase) ⇒ Object
A nil passphrase would make OpenSSL prompt on the terminal itself.
Methods inherited from KeyType
Class Method Details
.encrypted_key?(key_data, error) ⇒ Boolean
152 153 154 |
# File 'lib/net/ssh/key_factory.rb', line 152 def self.encrypted_key?(key_data, error) key_data.match(/ENCRYPTED/) end |
.open_ssl_class ⇒ Object
143 144 145 |
# File 'lib/net/ssh/key_factory.rb', line 143 def self.open_ssl_class raise Exception, "TODO: subclasses should implement" end |
.read(key_data, passphrase) ⇒ Object
A nil passphrase would make OpenSSL prompt on the terminal itself.
148 149 150 |
# File 'lib/net/ssh/key_factory.rb', line 148 def self.read(key_data, passphrase) open_ssl_class.new(key_data, passphrase || 'invalid') end |