diff options
-rw-r--r-- | lib/chef/resource/windows_certificate.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/chef/resource/windows_certificate.rb b/lib/chef/resource/windows_certificate.rb index d4ac9a29d6..e7261adfba 100644 --- a/lib/chef/resource/windows_certificate.rb +++ b/lib/chef/resource/windows_certificate.rb @@ -281,7 +281,12 @@ class Chef case ext when ".pfx" - OpenSSL::PKCS12.new(contents, new_resource.pfx_password).certificate + pfx = OpenSSL::PKCS12.new(contents, new_resource.pfx_password) + if pfx.ca_certs.nil? + pfx.certificate + else + [pfx.certificate] + pfx.ca_certs + end when ".p7b" OpenSSL::PKCS7.new(contents).certificates else |