diff options
author | Luke Kanies <luke@madstop.com> | 2008-05-02 13:47:44 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-05-02 13:47:44 -0500 |
commit | 6356c043a44c771d707750f96f7660a1093be9ac (patch) | |
tree | 509a3b2cdce0ff91ff62b960ac9c4c66de55ff2e /lib | |
parent | 4c590df607f3d2cb6921b8d8269862a4f8f2456c (diff) | |
download | puppet-6356c043a44c771d707750f96f7660a1093be9ac.tar.gz puppet-6356c043a44c771d707750f96f7660a1093be9ac.tar.xz puppet-6356c043a44c771d707750f96f7660a1093be9ac.zip |
Switched puppetmasterd to use the new-style server plumbing.
The code is much cleaner, and it seems to be mostly
functional, but we have to pick a strategy for signing
the host's certificate on first startup. Also, I haven't
actually done end-to-end testing yet, which needs the certs
working first.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/network/http/webrick.rb | 5 | ||||
-rw-r--r-- | lib/puppet/network/server.rb | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/puppet/network/http/webrick.rb b/lib/puppet/network/http/webrick.rb index 36fb0776b..9bcf9958f 100644 --- a/lib/puppet/network/http/webrick.rb +++ b/lib/puppet/network/http/webrick.rb @@ -1,6 +1,7 @@ require 'webrick' require 'webrick/https' require 'puppet/network/http/webrick/rest' +require 'puppet/network/xmlrpc/webrick_servlet' require 'thread' require 'puppet/ssl/certificate' @@ -106,7 +107,7 @@ class Puppet::Network::HTTP::WEBrick results[:SSLCACertificateFile] = Puppet[:localcacert] results[:SSLVerifyClient] = OpenSSL::SSL::VERIFY_PEER - results[:SSLCertificateStore] = setup_ssl_store if Puppet[:hostcrl] != 'false' + results[:SSLCertificateStore] = setup_ssl_store if Puppet[:crl] results end @@ -114,7 +115,7 @@ class Puppet::Network::HTTP::WEBrick # Create our Certificate revocation list def setup_ssl_store unless crl = Puppet::SSL::CertificateRevocationList.find("ca") - raise Puppet::Error, "Could not find CRL; set 'hostcrl' to 'false' to disable CRL usage" + raise Puppet::Error, "Could not find CRL; set 'crl' to 'false' to disable CRL usage" end store = OpenSSL::X509::Store.new store.purpose = OpenSSL::X509::PURPOSE_ANY diff --git a/lib/puppet/network/server.rb b/lib/puppet/network/server.rb index a610ea7c9..6ea2943ea 100644 --- a/lib/puppet/network/server.rb +++ b/lib/puppet/network/server.rb @@ -84,6 +84,14 @@ class Puppet::Network::Server http_server_class_by_type(@server_type) end + def start + listen + end + + def stop + unlisten + end + private def http_server |