summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-04 22:40:29 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-01-04 22:40:29 +0000
commit903b40b60ea21a272a6a26d046e95eecf79c9cc2 (patch)
tree8e759036eb45e4b280e14342e1e320c6951aa4e7 /lib/puppet
parent5e470b3fa7a2160e8f16cc9052252d05412f79a7 (diff)
downloadpuppet-903b40b60ea21a272a6a26d046e95eecf79c9cc2.tar.gz
puppet-903b40b60ea21a272a6a26d046e95eecf79c9cc2.tar.xz
puppet-903b40b60ea21a272a6a26d046e95eecf79c9cc2.zip
Applying patch by mccune from #409.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2045 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/networkclient.rb5
-rw-r--r--lib/puppet/server.rb2
2 files changed, 2 insertions, 5 deletions
diff --git a/lib/puppet/networkclient.rb b/lib/puppet/networkclient.rb
index 6284416e3..c419431be 100644
--- a/lib/puppet/networkclient.rb
+++ b/lib/puppet/networkclient.rb
@@ -110,10 +110,7 @@ module Puppet
def ca_file=(cafile)
@http.ca_file = cafile
store = OpenSSL::X509::Store.new
- cacert = OpenSSL::X509::Certificate.new(
- File.read(cafile)
- )
- store.add_cert(cacert)
+ store.add_file(cafile)
store.purpose = OpenSSL::X509::PURPOSE_SSL_CLIENT
@http.cert_store = store
end
diff --git a/lib/puppet/server.rb b/lib/puppet/server.rb
index 6809c7c36..3720f25c8 100644
--- a/lib/puppet/server.rb
+++ b/lib/puppet/server.rb
@@ -60,7 +60,7 @@ module Puppet
store = OpenSSL::X509::Store.new
store.purpose = OpenSSL::X509::PURPOSE_ANY
store.flags = OpenSSL::X509::V_FLAG_CRL_CHECK_ALL|OpenSSL::X509::V_FLAG_CRL_CHECK
- store.add_cert(@cacert)
+ store.add_file(@cacertfile)
store.add_crl(crl)
return store
end