summaryrefslogtreecommitdiffstats
path: root/lib/puppet/networkclient.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/networkclient.rb')
-rw-r--r--lib/puppet/networkclient.rb5
1 files changed, 1 insertions, 4 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