Straightening stuff

This commit is contained in:
Robin 2016-08-15 22:12:26 +02:00
commit 4587e7763e
2 changed files with 4 additions and 8 deletions

View file

@ -44,8 +44,6 @@ environment:
before_build:
- nuget restore
- ps: .\prebuild.ps1
- ps: $psw = ConvertTo-SecureString $env:CertificatePassword -AsPlainText -Force
- ps: Import-PfxCertificate -FilePath Greenshot.pfx -CertStoreLocation cert:\CurrentUser\My -Password $psw
build:
project: greenshot.sln
verbosity: normal

View file

@ -47,9 +47,7 @@ FillCredentials
# Write the certificate to a file
[System.Convert]::FromBase64String($env:Certificate) | set-content "greenshot.pfx" -encoding byte
# Import it
Import-PfxCertificate -FilePath .\Greenshot.pfx -CertStoreLocation Cert:\CurrentUser\My -Password $env:CertificatePassword
# Alternative
# $certutilArguments = @('-f','-p', $env:CertificatePassword, '-importpfx', "greenshot.pfx")
# Start-Process -wait certutil -ArgumentList $certutilArguments -NoNewWindow
# Decode password to secure string
$password = ConvertTo-SecureString $env:CertificatePassword -AsPlainText -Force
# Import pfx
Import-PfxCertificate -FilePath .\Greenshot.pfx -CertStoreLocation Cert:\CurrentUser\My -Password $password