Method: Puppet::SSL::Key#password

Defined in:
lib/puppet/ssl/key.rb

#passwordObject



38
39
40
41
42
43
44
45
46
# File 'lib/puppet/ssl/key.rb', line 38

def password
  return nil unless password_file and Puppet::FileSystem.exist?(password_file)

  # Puppet generates files at the default Puppet[:capass] using ASCII
  # User configured :passfile could be in any encoding
  # Use BINARY given the string is passed to an OpenSSL API accepting bytes
  # note this is only called internally
  Puppet::FileSystem.read(password_file, :encoding => Encoding::BINARY)
end