summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-11-14 09:36:09 -0800
committerGitHub <noreply@github.com>2018-11-14 09:36:09 -0800
commit85e25454989e8a7d463fd911d63a23d50e8e9978 (patch)
tree7f7712fc0ad39b17f9ece28c70e23179c6e319e7
parent7a1ca3d2dee6ad457ab9590bf05372f8f319e491 (diff)
parentce934beeb31d2a88305e0443c9ba73d2d66b63d1 (diff)
downloadchef-85e25454989e8a7d463fd911d63a23d50e8e9978.tar.gz
Merge pull request #7927 from chef/win_friendly_path
Replace usage of win_friendly_path helper in windows_certificate
-rw-r--r--lib/chef/resource/windows_certificate.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/resource/windows_certificate.rb b/lib/chef/resource/windows_certificate.rb
index afb69703a8..053a67e3e0 100644
--- a/lib/chef/resource/windows_certificate.rb
+++ b/lib/chef/resource/windows_certificate.rb
@@ -17,6 +17,7 @@
# limitations under the License.
#
+require "chef/util/path_helper"
require "chef/resource"
require "win32-certstore" if Chef::Platform.windows?
require "openssl"
@@ -179,7 +180,7 @@ class Chef
def cert_script(persist)
cert_script = "$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2"
- file = win_friendly_path(new_resource.source)
+ file = Chef::Util::PathHelper.cleanpath(new_resource.source)
cert_script << " \"#{file}\""
if ::File.extname(file.downcase) == ".pfx"
cert_script << ", \"#{new_resource.pfx_password}\""