mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 05:53:27 -07:00
The password needs to be a secure string, not a string.
This commit is contained in:
parent
9153a0baf5
commit
8660ee6591
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue