summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-03-30 23:17:40 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-03-30 23:17:40 +0000
commit4615e3a70cf53ba62a00d5d8f01a6d0ec9dffc26 (patch)
tree87245a7401376531048c90e6b8afcddf1b1a452a /lib/puppet/network
parentca5d0682705a3b5ee175e25b6cb5fca939a85443 (diff)
downloadpuppet-4615e3a70cf53ba62a00d5d8f01a6d0ec9dffc26.tar.gz
puppet-4615e3a70cf53ba62a00d5d8f01a6d0ec9dffc26.tar.xz
puppet-4615e3a70cf53ba62a00d5d8f01a6d0ec9dffc26.zip
Fixing Client.read_cert so that it automatically adds the certificate information to the driver when the certificate is correctly read. This makes sure the Net::Http instance has the cert all set up.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2375 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/network')
-rw-r--r--lib/puppet/network/client.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/puppet/network/client.rb b/lib/puppet/network/client.rb
index 13f1878fd..5603aeb43 100644
--- a/lib/puppet/network/client.rb
+++ b/lib/puppet/network/client.rb
@@ -36,6 +36,8 @@ class Puppet::Network::Client
attr_accessor :schedule, :lastrun, :local, :stopping
+ attr_reader :driver
+
# Set up subclass loading
handle_subclasses :client, "puppet/network/client"
@@ -109,6 +111,16 @@ class Puppet::Network::Client
end
end
+ # Make sure we set the driver up when we read the cert in.
+ def read_cert
+ if super
+ @driver.cert_setup(self) if @driver.respond_to?(:cert_setup)
+ return true
+ else
+ return false
+ end
+ end
+
# A wrapper method to run and then store the last run time
def runnow
if self.stopping