From 8660ee6591a81e3d3bd3716f277b873507771337 Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 15 Aug 2016 18:34:27 +0200 Subject: [PATCH] The password needs to be a secure string, not a string. --- build.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.ps1 b/build.ps1 index e5b002531..d894d5003 100644 --- a/build.ps1 +++ b/build.ps1 @@ -57,8 +57,8 @@ Function PrepareCertificate() { $decodedContentBytes | set-content "greenshot.pfx" -encoding byte #$certutilArguments = @('-p', $env:CertificatePassword, '-importpfx', "greenshot.pfx") #Start-Process -wait certutil -ArgumentList $certutilArguments -NoNewWindow - $psw = ConvertTo-SecureString $env:CertificatePassword -AsPlainText -Force - Import-PfxCertificate -FilePath .\Greenshot.pfx -CertStoreLocation Cert:\CurrentUser\My -Password "$psw" + $secureString = ConvertTo-SecureString $env:CertificatePassword -AsPlainText -Force + Import-PfxCertificate -FilePath .\Greenshot.pfx -CertStoreLocation Cert:\CurrentUser\My -Password $secureString } # Sign the specify file