summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Murawski <steven.murawski@gmail.com>2015-09-08 13:11:36 -0500
committerSteven Murawski <steven.murawski@gmail.com>2015-09-08 13:11:36 -0500
commitaa6d4e74aadc6d6f70d87b38a365e52ebc9ee2c2 (patch)
treefe9a576bb448663d2c347e529a47dd16730ce3af
parent0ebb32751dcdc3ed9ed634db5a0274be29d9ef77 (diff)
parent1162606a8d5f7be3a7af9526732fe8cb61f9c96b (diff)
downloadchef-aa6d4e74aadc6d6f70d87b38a365e52ebc9ee2c2.tar.gz
Merge pull request #3462 from chef/jdm/pscred-winrm
Fix issue where ps_credential does not work over winrm
-rw-r--r--lib/chef/win32/crypto.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/win32/crypto.rb b/lib/chef/win32/crypto.rb
index aa20c2dfd4..e9c1da954b 100644
--- a/lib/chef/win32/crypto.rb
+++ b/lib/chef/win32/crypto.rb
@@ -30,7 +30,7 @@ class Chef
def self.encrypt(str, &block)
data_blob = CRYPT_INTEGER_BLOB.new
- unless CryptProtectData(CRYPT_INTEGER_BLOB.new(str.to_wstring), nil, nil, nil, nil, 0, data_blob)
+ unless CryptProtectData(CRYPT_INTEGER_BLOB.new(str.to_wstring), nil, nil, nil, nil, CRYPTPROTECT_LOCAL_MACHINE, data_blob)
Chef::ReservedNames::Win32::Error.raise!
end
bytes = data_blob[:pbData].get_bytes(0, data_blob[:cbData])