diff options
| author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-03-02 07:30:14 +0000 |
|---|---|---|
| committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-03-02 07:30:14 +0000 |
| commit | 95856eaaf02361ff597ca2c85e51cf141fe81280 (patch) | |
| tree | db31ba74ce65523fa9dcd4d1cae0cd75c55a4395 /lib/puppet/server | |
| parent | ff1df8e1aef99dbdc222c5d5d808494fd08e7f83 (diff) | |
Okay, Puppet is now almost entirely capable of configuring itself. I have not yet added the extra tests to puppetmasterd to make sure it can start as a normal user, and the executables still fail some simple tests because they are producing output when they start (I will get rid of the output), but overall things look pretty good.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@965 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/server')
| -rw-r--r-- | lib/puppet/server/ca.rb | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lib/puppet/server/ca.rb b/lib/puppet/server/ca.rb index a008feb70..8b0a1a46f 100644 --- a/lib/puppet/server/ca.rb +++ b/lib/puppet/server/ca.rb @@ -48,8 +48,9 @@ class Server end def initialize(hash = {}) + Puppet.config.use(:puppet, :certificates, :ca) @autosign = hash[:autosign] || Puppet[:autosign] - @ca = Puppet::SSLCertificates::CA.new() + @ca = Puppet::SSLCertificates::CA.new(hash) end # our client sends us a csr, and we either store it for later signing, @@ -81,9 +82,9 @@ class Server # okay, we're now going to store the public key if we don't already # have it public_key = csr.public_key - unless FileTest.directory?(Puppet[:publickeydir]) - Puppet.recmkdir(Puppet[:publickeydir]) - end + #unless FileTest.directory?(Puppet[:publickeydir]) + # Puppet.recmkdir(Puppet[:publickeydir]) + #end pkeyfile = File.join(Puppet[:publickeydir], [hostname, "pem"].join('.')) if FileTest.exists?(pkeyfile) @@ -96,17 +97,17 @@ class Server f.print public_key.to_s } end - unless FileTest.directory?(Puppet[:certdir]) - Puppet.recmkdir(Puppet[:certdir], 0770) - end + #unless FileTest.directory?(Puppet[:certdir]) + # Puppet.recmkdir(Puppet[:certdir], 0770) + #end certfile = File.join(Puppet[:certdir], [hostname, "pem"].join(".")) #puts hostname #puts certfile - unless FileTest.directory?(Puppet[:csrdir]) - Puppet.recmkdir(Puppet[:csrdir], 0770) - end + #unless FileTest.directory?(Puppet[:csrdir]) + # Puppet.recmkdir(Puppet[:csrdir], 0770) + #end # first check to see if we already have a signed cert for the host cert, cacert = ca.getclientcert(hostname) if cert and cacert |
