class Chef::EncryptedAttribute::LocalNode
Get name and keys from local Chef
Node.
Public Instance Methods
key()
click to toggle source
Gets the local node key.
The key has the private key and the public key embedded.
@return [OpenSSL::PKey::RSA] the local node private and the public key.
# File lib/chef/encrypted_attribute/local_node.rb, line 37 def key OpenSSL::PKey::RSA.new(open(Chef::Config[:client_key]).read) end
name()
click to toggle source
Gets the local node name.
@return [String] local node name. @note currently not used
# File lib/chef/encrypted_attribute/local_node.rb, line 28 def name Chef::Config[:node_name] end
public_key()
click to toggle source
Gets the local node public key.
@return [OpenSSL::PKey::RSA] the local node public key.
# File lib/chef/encrypted_attribute/local_node.rb, line 44 def public_key key.public_key end