mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
attempting to resolve bug with accessing correct key store
This commit is contained in:
@@ -46,9 +46,8 @@ if ($CertificatePassword -eq "") {
|
||||
}
|
||||
|
||||
try {
|
||||
Write-Output "Trying to open cert: $($CertificatePath)"
|
||||
Write-Output "Trying to unlock cert with pass: $($CertificatePassword)"
|
||||
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertificatePath, $CertificatePassword) -ErrorAction Stop
|
||||
$certKeyStore = [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::MachineKeySet
|
||||
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertificatePath, $CertificatePassword, $certKeyStore) -ErrorAction Stop
|
||||
} catch {
|
||||
Write-Output "Error loading certificate file - we won't sign files."
|
||||
Write-Output $Error[0]
|
||||
|
||||
Reference in New Issue
Block a user