summaryrefslogtreecommitdiffstats
path: root/lib/puppet/executables
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/executables')
-rw-r--r--lib/puppet/executables/client/certhandler.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/puppet/executables/client/certhandler.rb b/lib/puppet/executables/client/certhandler.rb
index b041397ae..b73642941 100644
--- a/lib/puppet/executables/client/certhandler.rb
+++ b/lib/puppet/executables/client/certhandler.rb
@@ -4,12 +4,14 @@ module Puppet
module Client
class CertHandler
attr_writer :wait_for_cert, :one_time
- attr_reader :new_cert
+ attr_reader :caclient, :new_cert
def initialize(wait_time, is_one_time)
@wait_for_cert = wait_time
@one_time = is_one_time
@new_cert = false
+
+ @caclient = Puppet::Network::Client.ca.new()
end
# Did we just read a cert?
@@ -31,8 +33,6 @@ module Puppet
end
def retrieve_cert
- caclient = Puppet::Network::Client.ca.new()
-
while true do
begin
if caclient.request_cert
@@ -54,11 +54,11 @@ module Puppet
end
def read_cert
- Puppet::Network::HttpPool.read_cert
+ caclient.read_cert
end
def read_new_cert
- if Puppet::Network::HttpPool.read_cert
+ if caclient.read_cert
# If we read it in, then we need to get rid of our existing http connection.
# The @new_cert flag will help us do that, in that it provides a way
# to notify that the cert status has changed.