diff options
author | Luke Kanies <luke@madstop.com> | 2008-04-17 20:11:34 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-04-17 20:11:34 -0500 |
commit | e5c4687593766955de09e5613c892ce82a2a989d (patch) | |
tree | c656b30be6f15912494d0b2313bde96929dc05da /lib/puppet/ssl/base.rb | |
parent | d8bb81eabb6ad85d985ae7407e4260e800a0cf30 (diff) | |
download | puppet-e5c4687593766955de09e5613c892ce82a2a989d.tar.gz puppet-e5c4687593766955de09e5613c892ce82a2a989d.tar.xz puppet-e5c4687593766955de09e5613c892ce82a2a989d.zip |
Moving the password file handling into the SSL::Key class.
This was necessary because when the Indirector is used, there
isn't necessarily enough context available to know when a
password file should be used (e.g., when reading a Key from disk,
you don't know if that key was encrypted).
Now, the Key class automatically uses the right password file, and
only tries to use those files that actually exist.
This isn't very flexible, in that it only allows one CA file and
one non-CA file, but no one really uses anything but
the CA file anyway.
Diffstat (limited to 'lib/puppet/ssl/base.rb')
-rw-r--r-- | lib/puppet/ssl/base.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/puppet/ssl/base.rb b/lib/puppet/ssl/base.rb index ab040152d..80bfcae84 100644 --- a/lib/puppet/ssl/base.rb +++ b/lib/puppet/ssl/base.rb @@ -13,6 +13,11 @@ class Puppet::SSL::Base attr_accessor :name, :content + # Is this file for the CA? + def ca? + name == Puppet::SSL::Host.ca_name + end + def generate raise Puppet::DevError, "%s did not override 'generate'" % self.class end |