mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 21:43:24 -07:00
Trying with Import-PfxCertificate
This commit is contained in:
parent
3297c1ad7f
commit
f6156b6306
2 changed files with 7 additions and 7 deletions
|
@ -128,9 +128,9 @@ OutputDir=..\
|
|||
PrivilegesRequired=none
|
||||
SetupIconFile=..\..\icons\applicationIcon\icon.ico
|
||||
; Create a SHA1 signature
|
||||
SignTool=SignTool sign /debug /sm /fd sha1 /tr http://time.certum.pl /td sha1 $f
|
||||
SignTool=SignTool sign /debug /fd sha1 /tr http://time.certum.pl /td sha1 $f
|
||||
; Append a SHA256 to the previous SHA1 signature (this is what as does)
|
||||
SignTool=SignTool sign /debug /as /sm /fd sha256 /tr http://time.certum.pl /td sha256 $f
|
||||
SignTool=SignTool sign /debug /as /fd sha256 /tr http://time.certum.pl /td sha256 $f
|
||||
SignedUninstaller=yes
|
||||
UninstallDisplayIcon={app}\{#ExeName}.exe
|
||||
Uninstallable=true
|
||||
|
|
10
build.ps1
10
build.ps1
|
@ -55,17 +55,17 @@ Function MD5($filename) {
|
|||
Function PrepareCertificate() {
|
||||
$decodedContentBytes = [System.Convert]::FromBase64String($env:Certificate)
|
||||
$decodedContentBytes | set-content "greenshot.pfx" -encoding byte
|
||||
$certutilArguments = @('-p', $env:CertificatePassword, '-importpfx', "greenshot.pfx")
|
||||
Start-Process -wait certutil -ArgumentList $certutilArguments -NoNewWindow
|
||||
#$certutilArguments = @('-p', $env:CertificatePassword, '-importpfx', "greenshot.pfx")
|
||||
#Start-Process -wait certutil -ArgumentList $certutilArguments -NoNewWindow
|
||||
|
||||
#Import-PfxCertificate –FilePath "greenshot.pfx" "cert:\localMachine\my" -Password "$env:CertificatePassword"
|
||||
Import-PfxCertificate –FilePath "greenshot.pfx" -CertStoreLocation Cert:\CurrentUser\My -Password $env:CertificatePassword
|
||||
}
|
||||
|
||||
# Sign the specify file
|
||||
Function SignWithCertificate($filename) {
|
||||
Write-Host "Signing $filename"
|
||||
$signSha1Arguments = @('sign', '/debug', '/sm', '/fd', 'sha1' , '/tr', 'http://time.certum.pl', '/td', 'sha1' , $filename)
|
||||
$signSha256Arguments = @('sign', '/debug', '/as', '/sm', '/fd', 'sha256', '/tr', 'http://time.certum.pl', '/td', 'sha256', $filename)
|
||||
$signSha1Arguments = @('sign', '/debug', '/fd', 'sha1' , '/tr', 'http://time.certum.pl', '/td', 'sha1' , $filename)
|
||||
$signSha256Arguments = @('sign', '/debug', '/as', '/fd', 'sha256', '/tr', 'http://time.certum.pl', '/td', 'sha256', $filename)
|
||||
|
||||
Start-Process -wait $env:SignTool -ArgumentList $signSha1Arguments -NoNewWindow
|
||||
Start-Process -wait $env:SignTool -ArgumentList $signSha256Arguments -NoNewWindow
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue