diff --git a/scripts/build-win32.ps1 b/scripts/build-win32.ps1 index 7d8c23396..1a6a40b3c 100644 --- a/scripts/build-win32.ps1 +++ b/scripts/build-win32.ps1 @@ -83,18 +83,18 @@ If (!(Test-Path $inno_bin)) { if (!([string]::IsNullOrEmpty($cert_data)) -and !([string]::IsNullOrEmpty($cert_password))) { Write-Output "Certs detected!" # Decode and dump to temp file - # If (!(Test-Path $cert_path)) { + If (!(Test-Path $cert_path)) { Write-Output "Dumping certs to $cert_path..." $bytes = [Convert]::FromBase64String($cert_data) [IO.File]::WriteAllBytes($cert_path, $bytes) - # } + } # Verify the cert and password are good Write-Output "Verifying certs are good to go..." + $cert_secure_password = ConvertTo-SecureString $cert_password -AsPlainText -Force Import-PfxCertificate -FilePath "$cert_path" -Password $cert_secure_password -CertStoreLocation "Cert:\LocalMachine\My" # If we get this far we should be good! Write-Output "We can sign!" $can_sign = $true - $cert_secure_password = ConvertTo-SecureString $cert_password -AsPlainText -Force } # Get the things we need