Skip to content

Commit

Permalink
Properly accounted for Linux/Mac style thumbprint structures
Browse files Browse the repository at this point in the history
Signed-off-by: John McCrae <[email protected]>
  • Loading branch information
johnmccrae committed Nov 23, 2021
1 parent 66a402e commit 01c88d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/win32/certstore/store_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def get_cert_pem(thumbprint, store_name: @store_name, store_location: @store_loc
end
get_data = powershell_exec!(cert_ps_cmd(thumbprint, store_location: converted_store, store_name: store_name), :powershell, timeout: timeout)
get_data.result
rescue Chef::PowerShell::CommandFailed
rescue Chef_PowerShell::PowerShellExceptions::PowerShellCommandFailed
raise ArgumentError, "PowerShell threw an error retreiving the certificate. You asked for a cert with this thumbprint : #{thumbprint}, located in this store : #{store_name}, at this location : #{store_location}"
end

Expand Down

0 comments on commit 01c88d0

Please sign in to comment.